Systems and methods for extensions and inheritance for units of information manageable by a hardware/software interface system

ABSTRACT

By modeling real-world application objects with complex structures, behaviors, and operations described by a schema which is enforced by the hardware/software interface system, various embodiments of the present invention provide rich sub-typing functionality by extending Items (and Item types) using “Extensions” which provide additional data structures (Properties, Relationships, etc.) to already existing Items type structures. Extensions are strongly typed instances that cannot exist independently and must be attached to an Item or a Nested Element. Extensions are also intended to address “multi-typing” issues by enabling the overlap of type instances (e.g., a Document may be a “legal document” as well a “secure document”).

CROSS-REFERENCE

This application is a continuation-in-part of U.S. patent applicationSer. No. 10/646,580 (Atty. Docket No. MSFT-2735), filed on Aug. 21,2003, entitled “SYSTEMS AND METHODS FOR DATA MODELING IN AN ITEM-BASEDSTORAGE PLATFORM”, the contents of which are herein incorporated byreference.

This application is related by subject matter to the inventionsdisclosed in the following commonly assigned applications, the contentsof which are hereby incorporated by reference into this presentapplication in their entirety (and partially summarized herein forconvenience): U.S. patent application Ser. No. 10/647,058 (Atty. DocketNo. MSFT-1748), filed on Aug. 21, 2003, entitled “SYSTEMS AND METHODSFOR REPRESENTING UNITS OF INFORMATION MANAGEABLE BY A HARDWARE/SOFTWAREINTERFACE SYSTEM BUT INDEPENDENT OF PHYSICAL REPRESENTATION”; U.S.patent application Ser. No. 10/646,941 (Atty. Docket No. MSFT-1749),filed on Aug. 21, 2003, entitled “SYSTEMS AND METHODS FOR SEPARATINGUNITS OF INFORMATION MANAGEABLE BY A HARDWARE/SOFTWARE INTERFACE SYSTEMFROM THEIR PHYSICAL ORGANIZATION”; U.S. patent application Ser. No.10/646,940 (Atty. Docket No. MSFT-1750), filed on Aug. 21, 2003,entitled “SYSTEMS AND METHODS FOR THE IMPLEMENTATION OF A BASE SCHEMAFOR ORGANIZING UNITS OF INFORMATION MANAGEABLE BY A HARDWARE/SOFTWAREINTERFACE SYSTEM”; U.S. patent application Ser. No. 10/646,632 (Atty.Docket No. MSFT-1751), filed on Aug. 21, 2003, entitled “SYSTEMS ANDMETHODS FOR THE IMPLEMENTATION OF A CORE SCHEMA FOR PROVIDING ATOP-LEVEL STRUCTURE FOR ORGANIZING UNITS OF INFORMATION MANAGEABLE BY AHARDWARE/SOFTWARE INTERFACE SYSTEM”; U.S. patent application Ser. No.10/646,645 (Atty. Docket No. MSFT-1752), filed on Aug. 21, 2003,entitled “SYSTEMS AND METHOD FOR REPRESENTING RELATIONSHIPS BETWEENUNITS OF INFORMATION MANAGEABLE BY A HARDWARE/SOFTWARE INTERFACESYSTEM”; U.S. patent application Ser. No. 10/646,575 (Atty. Docket No.MSFT-2733), filed on Aug. 21, 2003, entitled “SYSTEMS AND METHODS FORINTERFACING APPLICATION PROGRAMS WITH AN ITEM-BASED STORAGE PLATFORM”;U.S. patent application Ser. No. 10/646,646 (Atty. Docket No.MSFT-2734), filed on Aug. 21, 2003, entitled “STORAGE PLATFORM FORORGANIZING, SEARCHING, AND SHARING DATA”; U.S. patent application No.______ (not yet assigned) (Atty. Docket No. MSFT-2829), filed on evendate herewith, entitled “SYSTEMS AND METHODS FOR THE IMPLEMENTATION OF ADIGITAL IMAGES SCHEMA FOR ORGANIZING UNITS OF INFORMATION MANAGEABLE BYA HARDWARE/SOFTWARE INTERFACE SYSTEM”; U.S. patent application No.______ (not yet assigned) (Atty. Docket No. MSFT-2844), filed on evendate herewith, entitled “SYSTEMS AND METHODS FOR PROVIDINGSYNCHRONIZATION SERVICES FOR UNITS OF INFORMATION MANAGEABLE BY AHARDWARE/SOFTWARE INTERFACE SYSTEM”; U.S. patent application No. ______(not yet assigned) (Atty. Docket No. MSFT-2845), filed on even dateherewith, entitled “SYSTEMS AND METHODS FOR PROVIDING RELATIONAL ANDHIERARCHICAL SYNCHRONIZATION SERVICES FOR UNITS OF INFORMATIONMANAGEABLE BY A HARDWARE/SOFTWARE INTERFACE SYSTEM”; and U.S. patentapplication No. ______ (not yet assigned) (Atty. Docket No. MSFT-2846),filed on even date herewith, entitled “SYSTEMS AND METHODS FOR THEIMPLEMENTATION OF A SYNCHRONIZATION SCHEMAS FOR UNITS OF INFORMATIONMANAGEABLE BY A HARDWARE/SOFTWARE INTERFACE SYSTEM”.

FIELD OF THE INVENTION

The present invention relates generally to the field of informationstorage and retrieval, and, more particularly, to an active storageplatform for organizing, searching, and sharing different types of datain a computerized system. Various embodiments of the present inventionare directed to the use of extension and inheritance methods utilized bya hardware/software interface system to manage data.

BACKGROUND

Individual disk capacity has been growing at roughly seventy percent(70%) per year over the last decade. Moore's law accurately predictedthe tremendous gains in central processing unit (CPU) power that hasoccurred over the years. Wired and wireless technologies have providedtremendous connectivity and bandwidth. Presuming current trendscontinue, within several years the average laptop computer will possessroughly one terabyte (TB) of storage and contain millions of files, and500 gigabyte (GB) drives will become commonplace.

Consumers use their computers primarily for communication and organizingpersonal information, whether it is traditional personal informationmanager (PIM) style data or media such as digital music or photographs.The amount of digital content, and the ability to store the raw bytes,has increased tremendously; however the methods available to consumersfor organizing and unifying this data has not kept pace. Knowledgeworkers spend enormous amounts of time managing and sharing information,and some studies estimate that knowledge workers spend 15-25% of theirtime on non-productive information related activities. Other studiesestimate that a typical knowledge worker spends about 2.5 hours per daysearching for information.

Developers and information technology (IT) departments investsignificant amounts of time and money in building their own data storesfor common storage abstractions to represent such things as people,places, times, and events. Not only does this result in duplicated work,but it also creates islands of common data with no mechanisms for commonsearching or sharing of that data. Just consider how many address bookscan exist today on a computer running the Microsoft Windows operatingsystem. Many applications, such as e-mail clients and personal financeprograms, keep individual address books, and there is little sharingamong applications of the address book data that each such programindividually maintains. Consequently, a finance program (like MicrosoftMoney) does not share addresses for payees with the addresses maintainedin an email contact folder (like the one in Microsoft Outlook). Indeed,many users have multiple devices and logically should synchronize theirpersonal data amongst themselves and across a wide variety of additionalsources, including cell phones to commercial services such as MSN andAOL; nevertheless, collaboration of shared documents is largely achievedby attaching documents to e-mail messages—that is, manually andinefficiently.

One reason for this lack of collaboration is that traditional approachesto the organization of information in computer systems have centered onthe use of file-folder-and-directory-based systems (“file systems”) toorganize pluralities of files into directory hierarchies of foldersbased on an abstraction of the physical organization of the storagemedium used to store the files. The Multics operating system, developedduring the 1960s, can be credited with pioneering the use of the files,folders, and directories to manage storable units of data at theoperating system level. Specifically, Multics used symbolic addresseswithin a hierarchy of files (thereby introducing the idea of a filepath) where physical addresses of the files were not transparent to theuser (applications and end-users). This file system was entirelyunconcerned with the file format of any individual file, and therelationships amongst and between files was deemed irrelevant at theoperating system level (that is, other than the location of the filewithin the hierarchy). Since the advent of Multics, storable data hasbeen organized into files, folders, and directories at the operatingsystem level. These files generally include the file hierarchy itself(the “directory”) embodied in a special file maintained by the filesystem. This directory, in turn, maintains a list of entriescorresponding to all of the other files in the directory and the nodallocation of such files in the hierarchy (herein referred to as thefolders). Such has been the state of the art for approximately fortyyears.

However, while providing a reasonable representation of informationresiding in the computer's physical storage system, a file system isnevertheless an abstraction of that physical storage system, andtherefore utilization of the files requires a level of indirection(interpretation) between what the user manipulates (units havingcontext, features, and relationships to other units) and what theoperating system provides (files, folders, and directories).Consequently, users (applications and/or end-users) have no choice butto force units of information into a file system structure even whendoing so is inefficient, inconsistent, or otherwise undesirable.Moreover, existing file systems know little about the structure of datastored in individual files and, because of this, most of the informationremains locked up in files that may only be accessed (andcomprehensible) to the applications that wrote them. Consequently, thislack of schematic description of information, and mechanisms formanaging information, leads to the creation of silos of data with littledata sharing among the individual silos. For example, many personalcomputer (PC) users have more than five distinct stores that containinformation about the people they interact with on some level—forexample, Outlook Contacts, online account addressees, Windows AddressBook, Quicken Payees, and instant messaging (IM) buddy lists—becauseorganizing files presents a significant challenge to these PC users.Because most existing file systems utilize a nested folder metaphor fororganizing files and folders, as the number of files increases theeffort necessary to maintain an organization scheme that is flexible andefficient becomes quite daunting. In such situations, it would be veryuseful to have multiple classifications of a single file; however, usinghard or soft links in existing file systems is cumbersome and difficultto maintain.

Several unsuccessful attempts to address the shortcomings of filesystems have been made in the past. Some of these previous attempts haveinvolved the use of content addressable memory to provide a mechanismwhereby data could be accessed by content rather than by physicaladdress. However, these efforts have proven unsuccessful because, whilecontent addressable memory has proven useful for small-scale use bydevices such as caches and memory management units, large-scale use fordevices such as physical storage media has not yet been possible for avariety of reasons, and thus such a solution simply does not exist.Other attempts using object-oriented database (OODB) systems have beenmade, but these attempts, while featuring strong databasecharacteristics and good non-file representations, were not effective inhandling file representations and could not replicate the speed,efficiency, and simplicity of the file and folder based hierarchicalstructure at the hardware/software interface system level. Otherefforts, such as those that attempted to use SmallTalk (and otherderivatives), proved to be quite effective at handling file and non-filerepresentations but lacked database features necessary to efficientlyorganize and utilize the relationships that exist between the variousdata files, and thus the overall efficiency of such systems wasunacceptable. Yet other attempts to use BeOS (and other such operatingsystems research) proved to be inadequate at handling non-filerepresentations—the same core shortcoming of traditional filesystems—despite being able to adequately represent files while providingsome necessary database features.

Database technology is another area of the art in which similarchallenges exits. For example, while the relational database model hasbeen a great commercial success, in truth independent software vendors(ISV) generally exercise a small portion of the functionality availablein relational database software products (such as Microsoft SQL Server).Instead, most of an application's interaction with such a product is inthe form of simple “gets” and “puts”. While there are a number ofreadily apparent reasons for this—such as being platform or databaseagnostic—one key reason that often goes unnoticed is that the databasedoes not necessarily provide the exact abstractions that a majorbusiness application vendor really needs. For example, while the realworld has the notion of “items”, such as “customers” or “orders” (alongwith an order's embedded “line items” as items in and of themselves),relational databases only talk in terms of tables and rows.Consequently, while the application may desire to have aspects ofconsistency, locking, security, and/or triggers at the item level (toname a few), generally databases provide these features only at thetable/row level. While this may work fine if each item gets mapped to asingle row in some table in the database, in the case of an order withmultiple line items there may be reasons why an item actually getsmapped to multiple tables and, when that is the case, the simplerelational database system does not quite provide the rightabstractions. Consequently, an application must build logic on top ofthe database to provide these basic abstractions. In other words, thebasic relational model does not provide a sufficient platform forstorage of data on which higher-level applications can easily bedeveloped because the basic relational model requires a level ofindirection between the application and the storage system—where thesemantic structure of the data might only be visible in the applicationin certain instances. While some database vendors are buildinghigher-level functionality into their products—such as providing objectrelational capabilities, new organizational models, and the like—nonehave yet to provide the kind of comprehensive solution needed, where atruly comprehensive solution is one which provides both useful datamodel abstractions (such as “Items,” “Extensions,” “Relationships,” andso on) for useful domain abstractions (such as “Persons,” “Locations,”“Events,” etc.).

In view of the foregoing deficiencies in existing data storage anddatabase technologies, there is a need for a new storage platform thatprovides an improved ability to organize, search, and share all types ofdata in a computer system—a storage platform that extends and broadensthe data platform beyond existing file systems and database systems, andthat is designed to be the store for all types of data. The presentinvention, together with the related inventions incorporated byreference earlier herein, satisfies this need. In particular, thepresent invention provides methods of extension and inheritance forobjects manipulated by a hardware/software interface system.

SUMMARY

The following summary provides an overview of various aspects of theinvention described in the context of the related inventionsincorporated-by-reference earlier herein (the “related inventions”).This summary is not intended to provide an exhaustive description of allof the important aspects of the invention, nor to define the scope ofthe invention. Rather, this summary is intended to serve as anintroduction to the detailed description and figures that follow.

The present invention, as well as the related inventions, arecollectively directed to a storage platform for organizing, searching,and sharing data. The storage platform of the present invention extendsand broadens the concept of data storage beyond existing file systemsand database systems, and is designed to be the store for all types ofdata including structured, non-structured, or semi-structured data.

The storage platform of the present invention comprises a data storeimplemented on a database engine. The database engine comprises arelational database engine with object relational extensions. The datastore implements a data model that supports organization, searching,sharing, synchronization, and security of data. Specific types of dataare described in schemas, and the platform provides a mechanism toextend the set of schemas to define new types of data (essentiallysubtypes of the basic types provides by the schemas). A synchronizationcapability facilitates the sharing of data among users or systems.File-system-like capabilities are provided that allow interoperabilityof the data store with existing file systems but without the limitationof such traditional file systems. A change tracking mechanism providesthe ability track changes to the data store. The storage platformfurther comprises a set of application program interfaces that enableapplications to access all of the foregoing capabilities of the storageplatform and to access the data described in the schemas.

The data model implemented by the data store defines units of datastorage in terms of items, elements, and relationships. An item is aunit of data storable in a data store and can comprise one or moreelements and relationships. An element is an instance of a typecomprising one or more fields (also referred to herein as a property). Arelationship is a link between two items. (As used herein, these andother specific terms may be capitalized in order to offset them fromother terms used in close proximity; however, there is no intentionwhatsoever to distinguish between a capitalized term, e.g. “Item”, andthe same term when not capitalized, e.g., “item”, and no suchdistinction should be presumed or implied.)

The computer system further comprises a plurality of Items where eachItem constitutes a discrete storable unit of information that can bemanipulated by a hardware/software interface system; a plurality of ItemFolders that constitute an organizational structure for said Items; anda hardware/software interface system for manipulating a plurality ofItems and wherein each Item belongs to at least one Item Folder and maybelong to more than one Item Folder.

An Item or some of the Item's property values may be computeddynamically as opposed to being derived from a persistent store. Inother words, the hardware/software interface system does not requirethat the Item be stored, and certain operations are supported such asthe ability to enumerate the current set of Items or the ability toretrieve an Item given its identifier (which is more fully described inthe sections that describe the application programming interface, orAPI) of the storage platform—for example, an Item might be the currentlocation of a cell phone or the temperature reading on a temperaturesensor. The hardware/software interface system may manipulate aplurality of Items, and may further comprise Items interconnected by aplurality of Relationships managed by the hardware/software interfacesystem.

A hardware/software interface system for the computer system furthercomprises a core schema to define a set of core Items which saidhardware/software interface system understands and can directly processin a predetermined and predictable way. To manipulate a plurality ofItems, the computer system interconnects said Items with a plurality ofRelationships and manages said Relationships at the hardware/softwareinterface system level.

The API of the storage platform provides data classes for each item,item extension, and relationship defined in the set of storage platformschemas. In addition, the application programming interface provides aset of framework classes that define a common set of behaviors for thedata classes and that, together with the data classes, provide the basicprogramming model for the storage platform API. The storage platform APIprovides a simplified query model that enables application programmersto form queries based on various properties of the items in the datastore, in a manner that insulates the application programmer from thedetails of the query language of the underlying database engine. Thestorage platform API also collects changes to an item made by anapplication program and then organizes them into the correct updatesrequired by the database engine (or any kind of storage engine) on whichthe data store is implemented. This enables application programmers tomake changes to an item in memory, while leaving the complexity of datastore updates to the API.

Through its common storage foundation and schematized data, the storageplatform of the present invention enables more efficient applicationdevelopment for consumers, knowledge workers and enterprises. It offersa rich and extensible application programming interface that not onlymakes available the capabilities inherent in its data model, but alsoembraces and extends existing file system and database access methods.

Within view of this overarching structure of interrelated inventions(described in detail in Section II of the Detailed Description), thepresent invention is specifically directed to the use of Extensions toextend functionality of Item and Property types, as well as to the useof Inheritance to facilitate efficient searching and organization amongrelated Items (described in detail in Section III of the DetailedDescription). Other features and advantages of the invention may becomeapparent from the following detailed description of the invention andaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing summary, as well as the following detailed description ofthe invention, is better understood when read in conjunction with theappended drawings. For the purpose of illustrating the invention, thereis shown in the drawings exemplary embodiments of various aspects of theinvention; however, the invention is not limited to the specific methodsand instrumentalities disclosed. In the drawings:

FIG. 1 is a block diagram representing a computer system in whichaspects of the present invention may be incorporated;

FIG. 2 is a block diagram illustrating a computer system divided intothree component groups: the hardware component, the hardware/softwareinterface system component, and the application programs component;

FIG. 2A illustrates the traditional tree-based hierarchical structurefor files grouped in folders in a directory in a file-based operatingsystem;

FIG. 3 is a block diagram illustrating a storage platform;

FIG. 4 illustrates the structural relationship between Items, ItemFolders, and Categories;

FIG. 5A is a block diagram illustrating the structure of an Item;

FIG. 5B is a block diagram illustrating the complex property types ofthe Item of FIG. 5A;

FIG. 5C is a block diagram illustrating the “Location” Item wherein itscomplex types are further described (explicitly listed);

FIG. 6A illustrates an Item as a subtype of the Item found in the BaseSchema;

FIG. 6B is a block diagram illustrating the subtype Item of FIG. 6Awherein its inherited types are explicitly listed (in addition to itsimmediate properties);

FIG. 7 is a block diagram illustrating the Base Schema including its twotop-level class types, Item and PropertyBase, and the additional BaseSchema types derived therefrom;

FIG. 8A is a block diagram illustrating Items in the Core Schema;

FIG. 8B is a block diagram illustrating the property types in the CoreSchema;

FIG. 9 is a block diagram illustrating an Item Folder, its member Items,and the interconnecting Relationships between the Item Folder and itsmember Items;

FIG. 10 is a block diagram illustrating a Category (which, again, is anItem itself), its member Items, and the interconnecting Relationshipsbetween the Category and its member Items;

FIG. 11 is a diagram illustrating a reference type hierarchy of the datamodel of the storage platform;

FIG. 12 is a diagram illustrating how relationships are classified;

FIG. 13 is a diagram illustrating a notification mechanism;

FIG. 14 is a diagram illustrating an example in which two transactionsare both inserting a new record into the same B-Tree;

FIG. 15 illustrates a data change detection process;

FIG. 16 illustrates an exemplary directory tree;

FIG. 17 shows an example in which an existing folder of adirectory-based file system is moved into the storage platform datastore;

FIG. 18 illustrates the concept of Containment Folders;

FIG. 19 illustrates the basic architecture of the storage platform API;

FIG. 20 schematically represents the various components of the storageplatform API stack;

FIG. 21A is a pictorial representation of an exemplary Contacts Itemschema;

FIG. 21B is a pictorial representation of the Elements for the exemplaryContacts Item schema of FIG. 21A;

FIG. 22 illustrates the runtime framework of the storage platform API;

FIG. 23 illustrates the execution of a “FindAll” operation;

FIG. 24 illustrates the process by which storage platform API classesare generated from the storage platform Schema;

FIG. 25 illustrates a schema on which a File API is based;

FIG. 26 is a diagram illustrating an access mask format used for datasecurity purposes;

FIG. 27 (parts a, b, and c) depicts a new identically protected securityregion being carved out of an existing security region;

FIG. 28 is a diagram illustrating the concept of an Item search view;

FIG. 29 is a diagram illustrating an exemplary Item hierarchy;

FIG. 30A illustrates an interface Interface1 as a conduit through whichfirst and second code segments communicate;

FIG. 30B illustrates an interface as comprising interface objects I1 andI2 which enable first and second code segments of a system tocommunicate via medium M;

FIG. 31A illustrates how the function provided by interface Interface1may be subdivided to convert the communications of the interface intomultiple interfaces Interface 1A, Interface 1B, Interface 1C;

FIG. 31B illustrates how the function provided by interface I1 may besubdivided into multiple interfaces I1 a, I1 b, I1 c;

FIG. 32A illustrates a scenario where a meaningless parameter precisioncan be ignored or replaced with an arbitrary parameter;

FIG. 32B illustrates a scenario where an interface is replaced by asubstitute interface that is defined to ignore or add parameters to aninterface;

FIG. 33A illustrates a scenario where a 1st and 2nd Code Segments aremerged into a module containing them both;

FIG. 33B illustrates a scenario where part or all of an interface may bewritten inline into another interface to form a merged interface.

FIG. 34A illustrates how one or more pieces of middleware might convertcommunications on the first interface to conform them to one or moredifferent interfaces;

FIG. 34B illustrates how a code segment can be introduced with aninterface to receive the communications from one interface but transmitthe functionality to second and third interfaces;

FIG. 35A illustrates how a just-in-time compiler (JIT) might convertcommunications from one code segment to another code segment;

FIG. 35B illustrates a JIT method of dynamically rewriting one or moreinterfaces may be applied to dynamically factor or otherwise alter saidinterface;

FIG. 36 illustrates a series of interrelated Items and a subset of theirRelationships;

FIG. 37A illustrates the shortcoming of standard subtyping of an Itemfor application specific purposes;

FIG. 37B illustrates a partial solution to the problems of standardsubtyping; and

FIG. 37C illustrates one embodiment of the present invention to extendan Item with an Extension that is distinct and separate from Contactitself, and thus enables a multi-typing functionality.

DETAILED DESCRIPTION

TABLE OF CONTENTS I. INTRODUCTION 18 A. EXEMPLARY COMPUTING ENVIRONMENT18 B. TRADITIONAL FILE-BASED STORAGE 22 II. WINFS STORAGE PLATFORM FORORGANIZING, 24 SEARCHING, AND SHARING DATA C. GLOSSARY 24 D. STORAGEPLATFORM OVERVIEW 25 E. THE DATA MODEL 26 1. Items 28 2. ItemIdentification 32 3. Item Folders and Categories 32 4. Schemas 34 a)Base Schema 34 b) Core Schema 35 5. Relationships 37 a) RelationshipDeclaration 38 b) Holding Relationship 39 c) Embedding Relationships 40d) Reference Relationships 41 e) Rules and Constraints 42 f) Ordering ofRelationships 42 6. Extensibility 48 a) Item extensions 49 b) ExtendingNestedElement types 53 F. DATABASE ENGINE 55 1. Data StoreImplementation Using UDTs 56 2. Item Mapping 57 3. Extension Mapping 584. Nested Element Mapping 58 5. Object Identity 58 6. SQL Object Naming58 7. Column Naming 59 8. Search Views 60 a) Item 61 (1) Master ItemSearch View 61 (2) Typed Item Search Views 61 b) Item Extensions 62 (1)Master Extension Search View 62 (2) Typed Extension Search Views 63 c)Nested Elements 63 d) Relationships 64 (1) Master Relationship SearchView 64 (2) Relationship Instance 64 Search Views e) 65 9. Updates 6510. Change Tracking & Tombstones 66 a) Change Tracking 66 (1) ChangeTracking in ″Master″ 66 Search Views (2) Change Tracking in ″Typed″ 67Search Views b) Tombstones 68 (1) Item Tombstones 68 (2) ExtensionTombstones 69 (3) Relationships Tombstone 69 (4) Tombstone Cleanup 7011. Helper APIs and Functions 70 a) Function [System.Storage].GetItem 70b) Function [System.Storage].GetExtension 70 c) Function[System.Storage].GetRelationship 71 12. Metadata 71 a) Schema Metadata71 b) Instance Metadata 71 G. SECURITY 71 H. NOTIFICATIONS AND CHANGETRACKING 72 I. SYNCHRONIZATION 73 1. Storage-Platform-to-StoragePlatform 73 Synchronization a) Synchronization (Sync) Controlling 74Applications b) Schema annotation 75 c) Sync Configuration 76 (1)Community Folder - Mappings 76 (2) Profiles 77 (3) Schedules 78 d)Conflict Handling 78 (1) Conflict Detection 79 (a) Knowledge-basedConflicts 79 (b) Constraint-based Conflicts 79 (2) Conflict Processing80 (a) Automatic Conflict resolution 80 (b) Conflict Logging 81 (c)Conflict inspection and 81 resolution (d) Convergence of replicas and 81Propagation of Conflict Resolutions 2. Synchronizing to non-storageplatform data stores 82 a) Sync Services 83 (1) Change Enumeration 83(2) Change Application 84 (3) Conflict Resolution 84 b) AdapterImplementation 85 3. Security 85 4. Manageability 86 J. TRADITIONAL FILESYSTEM INTEROPERABILITY 86 K. STORAGE PLATFORM API 87 III. EXTENSIONSAND INHERITANCE 94 A. TYPE SYSTEM 94 B. TYPE FAMILIES 99 1. NestedElement Types 100 2. Item Types 100 3. Relationship Types 100 a)Relationship Semantics 102 b) Relationship Rules and Constraints 104 4.Extension Types 105 C. EHANCED FUNCTIONALITY 106 1. Inheritance 106 2.Extensions 107 IV. CONCLUSION 108I. Introduction

The subject matter of the present invention is described withspecificity to meet statutory requirements. However, the descriptionitself is not intended to limit the scope of this patent. Rather, theinventors have contemplated that the claimed subject matter might alsobe embodied in other ways, to include different steps or combinations ofsteps similar to the ones described in this document, in conjunctionwith other present or future technologies. Moreover, although the term“step” may be used herein to connote different elements of methodsemployed, the term should not be interpreted as implying any particularorder among or between various steps herein disclosed unless and exceptwhen the order of individual steps is explicitly described.

A. Exemplary Computing Environment

Numerous embodiments of the present invention may execute on a computer.FIG. 1 and the following discussion is intended to provide a briefgeneral description of a suitable computing environment in which theinvention may be implemented. Although not required, various aspects ofthe invention may be described in the general context of computerexecutable instructions, such as program modules, being executed by acomputer, such as a client workstation or a server. Generally, programmodules include routines, programs, objects, components, data structuresand the like that perform particular tasks or implement particularabstract data types. Moreover, the invention may be practiced with othercomputer system configurations, including hand held devices, multiprocessor systems, microprocessor based or programmable consumerelectronics, network PCs, minicomputers, mainframe computers and thelike. The invention may also be practiced in distributed computingenvironments where tasks are performed by remote processing devices thatare linked through a communications network. In a distributed computingenvironment, program modules may be located in both local and remotememory storage devices.

As shown in FIG. 1, an exemplary general purpose computing systemincludes a conventional personal computer 20 or the like, including aprocessing unit 21, a system memory 22, and a system bus 23 that couplesvarious system components including the system memory to the processingunit 21. The system bus 23 may be any of several types of bus structuresincluding a memory bus or memory controller, a peripheral bus, and alocal bus using any of a variety of bus architectures. The system memoryincludes read only memory (ROM) 24 and random access memory (RAM) 25. Abasic input/output system 26 (BIOS), containing the basic routines thathelp to transfer information between elements within the personalcomputer 20, such as during start up, is stored in ROM 24. The personalcomputer 20 may further include a hard disk drive 27 for reading fromand writing to a hard disk, not shown, a magnetic disk drive 28 forreading from or writing to a removable magnetic disk 29, and an opticaldisk drive 30 for reading from or writing to a removable optical disk 31such as a CD ROM or other optical media. The hard disk drive 27,magnetic disk drive 28, and optical disk drive 30 are connected to thesystem bus 23 by a hard disk drive interface 32, a magnetic disk driveinterface 33, and an optical drive interface 34, respectively. Thedrives and their associated computer readable media provide non volatilestorage of computer readable instructions, data structures, programmodules and other data for the personal computer 20. Although theexemplary environment described herein employs a hard disk, a removablemagnetic disk 29 and a removable optical disk 31, it should beappreciated by those skilled in the art that other types of computerreadable media which can store data that is accessible by a computer,such as magnetic cassettes, flash memory cards, digital video disks,Bernoulli cartridges, random access memories (RAMs), read only memories(ROMs) and the like may also be used in the exemplary operatingenvironment. Likewise, the exemplary environment may also include manytypes of monitoring devices such as heat sensors and security or firealarm systems, and other sources of information.

A number of program modules may be stored on the hard disk, magneticdisk 29, optical disk 31, ROM 24 or RAM 25, including an operatingsystem 35, one or more application programs 36, other program modules 37and program data 38. A user may enter commands and information into thepersonal computer 20 through input devices such as a keyboard 40 andpointing device 42. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite disk, scanner or the like.These and other input devices are often connected to the processing unit21 through a serial port interface 46 that is coupled to the system bus,but may be connected by other interfaces, such as a parallel port, gameport or universal serial bus (USB). A monitor 47 or other type ofdisplay device is also connected to the system bus 23 via an interface,such as a video adapter 48. In addition to the monitor 47, personalcomputers typically include other peripheral output devices (not shown),such as speakers and printers. The exemplary system of FIG. 1 alsoincludes a host adapter 55, Small Computer System Interface (SCSI) bus56, and an external storage device 62 connected to the SCSI bus 56.

The personal computer 20 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 49. The remote computer 49 may be another personal computer, aserver, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the personal computer 20, although only a memory storagedevice 50 has been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 51 and a wide areanetwork (WAN) 52. Such networking environments are commonplace inoffices, enterprise wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the personal computer 20 isconnected to the LAN 51 through a network interface or adapter 53. Whenused in a WAN networking environment, the personal computer 20 typicallyincludes a modem 54 or other means for establishing communications overthe wide area network 52, such as the Internet. The modem 54, which maybe internal or external, is connected to the system bus 23 via theserial port interface 46. In a networked environment, program modulesdepicted relative to the personal computer 20, or portions thereof, maybe stored in the remote memory storage device. It will be appreciatedthat the network connections shown are exemplary and other means ofestablishing a communications link between the computers may be used.

As illustrated in the block diagram of FIG. 2, a computer system 200 canbe roughly divided into three component groups: the hardware component202, the hardware/software interface system component 204, and theapplications programs component 206 (also referred to as the “usercomponent” or “software component” in certain contexts herein).

In various embodiments of a computer system 200, and referring back toFIG. 1, the hardware component 202 may comprise the central processingunit (CPU) 21, the memory (both ROM 24 and RAM 25), the basicinput/output system (BIOS) 26, and various input/output (I/O) devicessuch as a keyboard 40, a mouse 42, a monitor 47, and/or a printer (notshown), among other things. The hardware component 202 comprises thebasic physical infrastructure for the computer system 200.

The applications programs component 206 comprises various softwareprograms including but not limited to compilers, database systems, wordprocessors, business programs, videogames, and so forth. Applicationprograms provide the means by which computer resources are utilized tosolve problems, provide solutions, and process data for various users(machines, other computer systems, and/or end-users).

The hardware/software interface system component 204 comprises (and, insome embodiments, may solely consist of) an operating system that itselfcomprises, in most cases, a shell and a kernel. An “operating system”(OS) is a special program that acts as an intermediary betweenapplication programs and computer hardware. The hardware/softwareinterface system component 204 may also comprise a virtual machinemanager (VMM), a Common Language Runtime (CLR) or its functionalequivalent, a Java Virtual Machine (JVM) or its functional equivalent,or other such software components in the place of or in addition to theoperating system in a computer system. The purpose of ahardware/software interface system is to provide an environment in whicha user can execute application programs. The goal of anyhardware/software interface system is to make the computer systemconvenient to use, as well as utilize the computer hardware in anefficient manner.

The hardware/software interface system is generally loaded into acomputer system at startup and thereafter manages all of the applicationprograms in the computer system. The application programs interact withthe hardware/software interface system by requesting services via anapplication program interface (API). Some application programs enableend-users to interact with the hardware/software interface system via auser interface such as a command language or a graphical user interface(GUI).

A hardware/software interface system traditionally performs a variety ofservices for applications. In a multitasking hardware/software interfacesystem where multiple programs may be running at the same time, thehardware/software interface system determines which applications shouldrun in what order and how much time should be allowed for eachapplication before switching to another application for a turn. Thehardware/software interface system also manages the sharing of internalmemory among multiple applications, and handles input and output to andfrom attached hardware devices such as hard disks, printers, and dial-upports. The hardware/software interface system also sends messages toeach application (and, in certain case, to the end-user) regarding thestatus of operations and any errors that may have occurred. Thehardware/software interface system can also offload the management ofbatch jobs (e.g., printing) so that the initiating application is freedfrom this work and can resume other processing and/or operations. Oncomputers that can provide parallel processing, a hardware/softwareinterface system also manages dividing a program so that it runs on morethan one processor at a time.

A hardware/software interface system shell (simply referred to herein asa “shell”) is an interactive end-user interface to a hardware/softwareinterface system. (A shell may also be referred to as a “commandinterpreter” or, in an operating system, as an “operating systemshell”). A shell is the outer layer of a hardware/software interfacesystem that is directly accessible by application programs and/orend-users. In contrast to a shell, a kernel is a hardware/softwareinterface system's innermost layer that interacts directly with thehardware components.

While it is envisioned that numerous embodiments of the presentinvention are particularly well-suited for computerized systems, nothingin this document is intended to limit the invention to such embodiments.On the contrary, as used herein the term “computer system” is intendedto encompass any and all devices capable of storing and processinginformation and/or capable of using the stored information to controlthe behavior or execution of the device itself, regardless of whethersuch devices are electronic, mechanical, logical, or virtual in nature.

B. Traditional File-Based Storage

In most computer systems today, “files” are units of storableinformation that may include the hardware/software interface system aswell as application programs, data sets, and so forth. In all modemhardware/software interface systems (Windows, Unix, Linux, Mac OS,virtual machine systems, and so forth), files are the basic discrete(storable and retrievable) units of information (e.g., data, programs,and so forth) that can be manipulated by the hardware/software interfacesystem. Groups of files are generally organized in “folders.” InMicrosoft Windows, the Macintosh OS, and other hardware/softwareinterface systems, a folder is a collection of files that can beretrieved, moved, and otherwise manipulated as single units ofinformation. These folders, in turn, are organized in a tree-basedhierarchical arrangement called a “directory” (discussed in more detailherein below). In certain other hardware/software interface systems,such as DOS, z/OS and most Unix-based operating systems, the terms“directory” and/or “folder” are interchangeable, and early Applecomputer systems (e.g., the Apple IIe) used the term “catalog” insteadof directory; however, as used herein, all of these terms are deemed tobe synonymous and interchangeable and are intended to further includeall other equivalent terms for and references to hierarchicalinformation storage structures and their folder and file components.

Traditionally, a directory (a.k.a. a directory of folders) is atree-based hierarchical structure wherein files are grouped into foldersand folder, in turn, are arranged according to relative nodal locationsthat comprise the directory tree. For example, as illustrated in FIG.2A, a DOS-based file system base folder (or “root directory”) 212 maycomprise a plurality of folders 214, each of which may further compriseadditional folders (as “subfolders” of that particular folder) 216, andeach of these may also comprise additional folders 218 ad infinitum.Each of these folders may have one or more files 220 although, at thehardware/software interface system level, the individual files in afolder have nothing in common other than their location in the treehierarchy. Not surprisingly, this approach of organizing files intofolder hierarchies indirectly reflects the physical organization oftypical storage media used to store these files (e.g., hard disks,floppy disks, CD-ROMs, etc.).

In addition to the foregoing, each folder is a container for itssubfolders and its files—that is, each folder owns its subfolders andfiles. For example, when a folder is deleted by the hardware/softwareinterface system, that folder's subfolders and files are also deleted(which, in the case of each subfolder, further includes its ownsubfolders and files recursively). Likewise, each file is generallyowned by only one folder and, although a file can be copied and the copylocated in a different folder, a copy of a file is itself a distinct andseparate unit that has no direct connection to the original (e.g.,changes to the original file are not mirrored in the copy file at thehardware/software interface system level). In this regard, files andfolders are therefore characteristically “physical” in nature becausefolders are the treated like physical containers, and files are treatedas discrete and separate physical elements inside these containers.

II. WinFS Storage Platform for Organizing, Searching, and Sharing Data

The present invention, in combination with the related inventionsincorporated by reference as discussed earlier herein, is directed to astorage platform for organizing, searching, and sharing data. Thestorage platform of the present invention extends and broadens the dataplatform beyond the kinds of existing file systems and database systemsdiscussed above, and is designed to be the store for all types of data,including a new form of data called Items.

C. Glossary

As used herein and in the claims, the following terms have the followingmeanings:

-   -   An “Item” is an unit of storable information accessible to a        hardware/software interface system that, unlike a simple file,        is an object having a basic set of properties that are commonly        supported across all objects exposed to an end-user by the        hardware/software interface system shell. Items also have        properties and relationships that are commonly supported across        all Item types including features that allow new properties and        relationships to be introduced (and discussed in great detail        later herein).    -   An “operating system” (OS) is a special program that acts as an        intermediary between application programs and computer hardware.        An operating system comprises, in most cases, a shell and a        kernel.    -   A “hardware/software interface system” is software, or a        combination of hardware and software, that serves as the        interface between the underlying hardware components of a        computer system and applications that execute on the computer        system. A hardware/software interface system typically comprises        (and, in some embodiments, may solely consist of) an operating        system. A hardware/software interface system may also comprise a        virtual machine manager (VMM), a Common Language Runtime (CLR)        or its functional equivalent, a Java Virtual Machine (JVM) or        its functional equivalent, or other such software components in        the place of or in addition to the operating system in a        computer system. The purpose of a hardware/software interface        system is to provide an environment in which a user can execute        application programs. The goal of any hardware/software        interface system is to make the computer system convenient to        use, as well as utilize the computer hardware in an efficient        manner.

D. Storage Platform Overview

Referring to FIG. 3, a storage platform 300 comprises a data store 302implemented on a database engine 314. In one embodiment, the databaseengine comprises a relational database engine with object relationalextensions. In one embodiment, the relational database engine 314comprises the Microsoft SQL Server relational database engine. The datastore 302 implements a data model 304 that supports the organization,searching, sharing, synchronization, and security of data. Specifictypes of data are described in schemas, such as schemas 340, and thestorage platform 300 provides tools 346 for deploying those schemas aswell as for extending those schemas, as described more fully below.

A change tracking mechanism 306 implemented within the data store 302provides the ability track changes to the data store. The data store 302also provides security capabilities 308 and a promotion/demotioncapability 310, both of which are discussed more fully below. The datastore 302 also provides a set of application programming interfaces 312to expose the capabilities of the data store 302 to other storageplatform components and application programs (e.g., application programs350 a, 350 b, and 350 c) that utilize the storage platform. The storageplatform of the present invention still further comprises an applicationprogramming interfaces (API) 322, which enables application programs,such as application programs 350 a, 350 b, and 350 c, to access all ofthe foregoing capabilities of the storage platform and to access thedata described in the schemas. The storage platform API 322 may be usedby application programs in combination with other APIs, such as the OLEDB API 324 and the Microsoft Windows Win32 API 326.

The storage platform 300 of the present invention may provide a varietyof services 328 to application programs, including a synchronizationservice 330 that facilitates the sharing of data among users or systems.For example, the synchronization service 330 may enable interoperabilitywith other data stores 340 having the same format as data store 302, aswell as access to data stores 342 having other formats. The storageplatform 300 also provides file system capabilities that allowinteroperability of the data store 302 with existing file systems, suchas the Windows NTFS files system 318. In at least some embodiments, thestorage platform 320 may also provide application programs withadditional capabilities for enabling data to be acted upon and forenabling interaction with other systems. These capabilities may beembodied in the form of additional services 328, such as an Info Agentservice 334 and a notification service 332, as well as in the form ofother utilities 336.

In at least some embodiments, the storage platform is embodied in, orforms an integral part of, the hardware/software interface system of acomputer system. For example, and without limitation, the storageplatform of the present invention may be embodied in, or form anintegral part of, an operating system, a virtual machine manager (VMM),a Common Language Runtime (CLR) or its functional equivalent, or a JavaVirtual Machine (JVM) or its functional equivalent. Through its commonstorage foundation, and schematized data, the storage platform of thepresent invention enables more efficient application development forconsumers, knowledge workers and enterprises. It offers a rich andextensible programming surface area that not only makes available thecapabilities inherent in its data model, but also embraces and extendsexisting file system and database access methods.

In the following description, and in various ones of the figures, thestorage platform 300 of the present invention may be referred to as“WinFS.” However, use of this name to refer to the storage platform issolely for convenience of description and is not intended to be limitingin any way.

E. The Data Model

The data store 302 of the storage platform 300 of the present inventionimplements a data model that supports the organization, searching,sharing, synchronization, and security of data that resides in thestore. In the data model of the present invention, an “Item” is thefundamental unit of storage information. The data model provides amechanism for declaring Items and Item extensions and for establishingrelationships between Items and for organizing Items in Item Folders andin Categories, as described more fully below.

The data model relies on two primitive mechanisms, Types andRelationships. Types are structures which provide a format which governsthe form of an instance of the Type. The format is expressed as anordered set of Properties. A Property is a name for a value or set ofvalues of a given Type. For example a USPostalAddress type might havethe properties Street, City, Zip, State in which Street, City and Stateare of type String and Zip is of Type Int32. Street may be multi-valued(i.e. a set of values) allowing the address to have more than one valuefor the Street property. The system defines certain primitive types thatcan be used in the construction of other types—these include String,Binary, Boolean, Int16, Int32, Int64, Single, Double, Byte, DateTime,Decimal and GUID. The Properties of a Type may be defined using any ofthe primitive types or (with some restrictions noted below) any of theconstructed types. For example a Location Type might be defined that hadProperties Coordinate and Address where the Address Property is of TypeUSPostalAddress as described above. Properties may also be required oroptional.

Relationships can be declared and represent a mapping between the setsof instances of two types. For example there may be a Relationshipdeclared between the Person Type and the Location Type called LivesAtwhich defines which people live at which locations. The Relationship hasa name, two endpoints, namely a source endpoint and a target endpoint.Relationships may also have an ordered set of properties. Both theSource and Target endpoints have a Name and a Type. For example theLivesAt Relationship has a Source called Occupant of Type Person and aTarget called Dwelling of Type Location and in addition has propertiesStartDate and EndDate indicating the period of time for which theoccupant lived at the dwelling. Note that a Person may live at multipledwellings over time and a dwelling may have multiple occupants so themost likely place to put the StartDate and EndDate information is on therelationship itself.

Relationships define a mapping between instances that is constrained bythe types given as the endpoint types. For example the LivesAtrelationship cannot be a relationship in which an Automobile is theOccupant because an Automobile is not a Person.

The data model does allow the definition of a subtype-supertyperelationship between types. The subtype-supertype relationship alsoknown as the BaseType relationship is defined in such a way that if TypeA is a BaseType for Type B it must be the case that every instance of Bis also an instance of A. Another way of expressing this is that everyinstance that conforms to B must also conform to A. If, for example Ahas a property Name of Type String while B has a property Age of TypeInt16, it follows that any instance of B must have both a Name and anAge. The type hierarchy may be envisaged as an tree with a singlesupertype at the root. The branches from the root provide the firstlevel subtypes, the branches at this level provide the second levelsubtypes and so on to the leaf-most subtypes which themselves do nothave any subtypes. The tree is not constrained to be of a uniform depthbut cannot contain any cycles. A given Type may have zero or manysubtypes and zero or one super type. A given instance may conform to atmost one type together with that type's super types. To put it anotherway, for a given instance at any level in the tree the instance mayconform to at most one subtype at that level. A type is said to beAbstract if instances of the type must also be an instance of a subtypeof the type.

1. Items

An Item is a unit of storable information that, unlike a simple file, isan object having a basic set of properties that are commonly supportedacross all objects exposed to an end-user or application program by thestorage platform. Items also have properties and relationships that arecommonly supported across all Item types including features that allownew properties and relationships to be introduced, as discussed below.

Items are the objects for common operations such as copy, delete, move,open, print, backup, restore, replicate, and so forth. Items are theunits that can be stored and retrieved, and all forms of storableinformation manipulated by the storage platform exist as Items,properties of Items, or Relationships between Items, each of which isdiscussed in greater detail herein below.

Items are intended to represent real-world and readily-understandableunits of data like Contacts, People, Services, Locations, Documents (ofall various sorts), and so on. FIG. 5A is a block diagram illustratingthe structure of an Item. The unqualified name of the Item is“Location”. The qualified name of the Item is “Core.Location” whichindicates that this Item structure is defined as a specific type of Itemin the Core Schema. (The Core Schema is discussed in more detail laterherein.)

The Location Item has a plurality of properties including EAddresses,MetropolitanRegion, Neighborhood, and PostalAddresses. The specific typeof property for each is indicated immediately following the propertyname and is separated from the property name by a colon (“:”). To theright of the type name, the number of values permitted for that propertytype is indicated between brackets (“[ ]”) wherein an asterisk (“*”) tothe right of the colon (“:”) indicates an unspecified and/or unlimitednumber (“many”). A “1” to the right of the colon indicates that therecan be at most one value. A zero (“0”) to the left of the colonindicates that the property is optional (there may be no value at all).A “1” to the left of the colon indicates that there must be at least onevalue (the property is required). Neighborhood and MetropolitanRegionare both of type “nvarchar” (or equivalent) which is a predefined datatype or “simple type” (and denoted herein by the lack ofcapitalization). EAddresses and PostalAddresses, however, are propertiesof defined types or “complex types” (as denoted herein bycapitalization) of types EAddress and PostalAddress respectively. Acomplex type is type that is derived from one or more simple data typesand/or from other complex types. The complex types for the properties ofan Item also constitute “nested elements” since the details of thecomplex type are nested into the immediate Item to define itsproperties, and the information pertaining to these complex types ismaintained with the Item that has these properties (within the Item'sboundary, as discussed later herein). These concepts of typing are wellknown and readily appreciated by those of skill in the art.

FIG. 5B is a block diagram illustrating the complex property typesPostalAddress and EAddress. The PostalAddress property type defines thatan Item of property type PostalAddress can be expected to have zero orone City values, zero or one CountryCode values, zero or one MailStopvalues, and any number (zero to many) of PostalAddressTypes, and so onand so forth. In this way, the shape of the data for a particularproperty in an Item is hereby defined. The EAddress property type issimilarly defined as shown. Although optionally used herein thisApplication, another way to represent the complex types in the LocationItem is to draw the Item with the individual properties of each complextype listed therein. FIG. 5C is a block diagram illustrating theLocation Item wherein its complex types are further described. However,it should be understood that this alternative representation of theLocation Item in this FIG. 5C is for the exact same Item illustrated inFIG. 5A. The storage platform of the present invention also allowssubtyping whereby one property type can be a subtype of another (wherethe one property type inherits the properties of another, parentproperty type).

Similar to but distinct from properties and their property types, Itemsinherently represent their own Item Types that can also be the subjectof subtyping. In other words, the storage platform in severalembodiments of the present invention allows an Item to be a subtype ofanother Item (whereby the one Item inherits the properties of the other,parent Item). Moreover, for various embodiments of the presentinvention, every Item is a subtype of the “Item” Item type which is thefirst and foundational Item type found in the Base Schema. (The BaseSchema will also be discussed in detail later herein.) FIG. 6Aillustrates an Item, the Location Item in this Instance, as being asubtype of the Item Item type found in the Base Schema. In this drawing,the arrow indicates that the Location Item (like all other Items) is asubtype of the Item Item type. The Item Item type, as the foundationalItem from which all other Items are derived, has a number of importantproperties such as ItemId and various timestamps, and thereby definesthe standard properties of all Items in an operating system. In thepresent figure, these properties of the Item Item type are inherited byLocation and thereby become properties of Location.

Another way to represent the properties in the Location Item inheritedfrom the Item Item type is to draw Location with the individualproperties of each property type from the parent Item listed therein.FIG. 6B is a block diagram illustrating the Location Item wherein itsinherited types described in addition to its immediate properties. Itshould be noted and understood that this Item is the same Itemillustrated in FIG. 5A, although in the present figure Location isillustrated with all of its properties, both immediate—shown in boththis figure and FIG. 5A—and inherited—shown in this figure but not FIG.5A (whereas in FIG. 5A these properties are referenced by showing withan arrow that the Location Item is a subtype of the Item Item type).

Items are stand-alone objects; thus, if you delete an Item, all of theItems immediate and inherited properties are also deleted. Similarly,when retrieving an Item, what is received is the Item and all of itsimmediate and inherited properties (including the information pertainingto its complex property types). Certain embodiments of the presentinvention may enable one to request a subset of properties whenretrieving a specific Item; however, the default for many suchembodiments is to provide the Item with all of its immediate andinherited properties when retrieved. Moreover, the properties of Itemscan also be extended by adding new properties to the existing propertiesof that Item's type. These “extensions” are thereafter bona fideproperties of the Item and subtypes of that Item type may automaticallyinclude the extension properties.

The “boundary” of the Item is represented by its properties (includingcomplex property types, extensions, and so forth). An Item's boundaryalso represents the limit of an operation performed on an Item such ascopy, delete, move, create, and so on. For example, in severalembodiments of the present invention, when an Item is copied, everythingwithin that Item's boundary is also copied. For each Item, the boundaryencompasses the following:

-   -   The Item Type of the Item and, if the Item is a subtype of        another Item (as is the case in several embodiments of the        present invention where all Items are derived from a single Item        and Item Type in the Base Schema), any applicable subtype        information (that is, information pertaining to the parent Item        Type). If the original Item being copied is a subtype of another        Item, the copy may also be a subtype of that same Item.    -   The Item's complex-type properties and extensions, if any. If        the original Item has properties of complex types (native or        extended), the copy may also have the same complex types.    -   The Item's records on “ownership relationships”, that is, the        Item's own list of what other Items (the “Target Items”) are        owned by the present Item (the “Owning Item”). This is        particularly relevant in regard to Item Folders, discussed more        fully below, and the rule stated below that all Items must        belong to at least one Item Folder. Moreover, in regard to        embedded items—iscussed more fully below—an embedded item is        considered to be part of the Item in which it is embedded for        operations such as copy, delete, and the like.

2. Item Identification

Items are uniquely identified within the global items space with anItemID. The Base.Item type defines a field ItemID of type GUID thatstores the identity for the Item. An Item must have exactly one identityin the data store 302.

An item reference is a data structure that contains information tolocate and identify an Item. In the data model, an abstract type isdefined named ItemReference from which all item reference types derive.The ItemReference type defines a virtual method named Resolve. TheResolve method resolves the ItemReference and returns an Item. Thismethod is overridden by the concrete subtypes of ItemReference, whichimplement a function that retrieves an Item given a reference. TheResolve method is invoked as part of the storage platform API 322.

ItemIDReference is a subtype of ItemReference. It defines a Locator andan ItemID field. The Locator field names (i.e. identifies) an itemdomain. It is processed by a locator resolution method that can resolvethe value of the Locator to an item domain. The ItemID field is of typeItemID

ItemPathReference is a specialization of ItemReference that defines aLocator and a Path field. The Locator field identifies an item domain.It is processed by a locator resolution method that can resolve thevalue of the Locator to an item domain. The Path field contains a(relative) path in the storage platform namespace rooted at the itemdomain provided by the Locator.

This type of reference cannot be used in a set operation. The referencemust generally be resolved through a path resolution process. TheResolve method of the storage platform API 322 provides thisfunctionality.

The reference forms discussed above are represented through thereference type hierarchy illustrated in FIG. 11. Additional referencetypes that inherit from these types can be defined in the schemas. Theycan be used in a relationship declaration as type of the target field.

3. Item Folders and Categories

As discussed more fully below, groups of Items can are organized intospecial Items called Item Folders (which are not to be confused withfile folders). Unlike in most file systems, however, an Item can belongto more than one Item Folder, such that when an Item is accessed in oneItem Folder and revised, this revised Item can then be accessed directlyfrom another Item folder. In essence, although access to an Item mayoccur from different Item Folders, what is actually being accessed is infact the very same Item. However, an Item Folder does not necessarilyown all of its member Items, or may simply co-own Items in conjunctionwith other folders, such that the deletion of an Item Folder does notnecessarily result in the deletion of the Item. Nevertheless, in severalembodiments of the present invention, an Item must belong to at leastone Item Folder so that if the sole Item Folder for a particular Item isdeleted then, for some embodiments, the Item is automatically deletedor, in alternative embodiments, the Item automatically becomes a memberof a default Item Folder (e.g., a “Trash Can” Item Folder conceptuallysimilar to similarly-named folders used in various file-and-folder-basedsystems).

As also discussed more fully below, Items may also belong to Categoriesbased on common described characteristic such as (a) an Item Type (orTypes), (b) a specific immediate or inherited property (or properties),or (c) a specific value (or values) corresponding to an Item property.For example, a Item comprising specific properties for personal contactinformation might automatically belong to a Contact Category, and anyItem having contact information properties would likewise automaticallybelong to this Category. Likewise, any Item having a location propertywith a value of “New York City” might automatically belong to aNewYorkCity Category.

Categories are conceptually different form Item Folders in that, whereasItem Folders may comprise Items that are not interrelated (i.e., withouta common described characteristic), each Item in a Category has a commontype, property, or value (a “commonality”) that is described for thatCategory, and it is this commonality that forms the basis for itsrelationship to and among the other Items in the Category. Moreover,whereas an Item's membership in a particular Folder is not compulsorybased on any particular aspect of that Item, for certain embodiments allItems having a commonality categorically related to a Category mightautomatically become a member of the Category at the hardware/softwareinterface system level. Conceptually, Categories can also be thought ofas virtual Item Folders whose membership is based on the results of aspecific query (such as in the context of a database), and Items thatmeet the conditions of this query (defined by the commonalities of theCategory) would thus comprise the Category's membership.

FIG. 4 illustrates the structural relationship between Items, ItemFolders, and Categories. A plurality of Items 402, 404, 406, 408, 410,412, 414, 416, 418, and 420 are members of various Item Folders 422,424, 426, 428, and 430. Some Items may belong to more than one ItemFolder, e.g., Item 402 belong to Item Folders 422 and 424. Some Items,e.g., Item 402, 404, 406, 408, 410, and 412 are also members of one ormore Categories 432, 434, and 436, while other times, e.g., Items 414,416, 418, and 420, may belong to no Categories (although this is largelyunlikely in certain embodiments where the possession of any propertyautomatically implies membership in a Category, and thus an Item wouldhave to be completely featureless in order not to be a member of anycategory in such an embodiment). In contrast to the hierarchicalstructure of folders, both Categories and Item Folders have structuresmore akin to directed graphs as shown. In any event, the Items, ItemFolders, and Categories are all Items (albeit of different Item Types).

In contrast to files, folders, and directories, the Items, Item Folders,and Categories of the present invention are not characteristically“physical” in nature because they do not have conceptual equivalents ofphysical containers, and therefore Items may exist in more than one suchlocation. The ability for Items to exist in more than one Item Folderlocation as well as being organized into Categories provides an enhancedand enriched degree of data manipulation and storage structurecapabilities at the hardware/software interface level, beyond thatcurrently available in the art.

4. Schemas

a) Base Schema

To provide a universal foundation for the creation and use of Items,various embodiments of the storage platform of the present inventioncomprise a Base Schema that establishes a conceptual framework forcreating and organizing Items and properties. The Base Schema definescertain special types of Items and properties, and the features of thesespecial foundational types from which subtypes can be further derived.The use of this Base Schema allows a programmer to conceptuallydistinguish Items (and their respective types) from properties (andtheir respective types). Moreover, the Base Schema sets forth thefoundational set of properties that all Items may possess as all Items(and their corresponding Item Types) are derived from this foundationalItem in the Base Schema (and its corresponding Item Type).

As illustrated in FIG. 7, and in regard to several embodiments of thepresent invention, the Base Schema defines three top-level types: Item,Extension, and PropertyBase. As shown, the Item type is defined by theproperties of this foundational “Item” Item type. In contrast, the toplevel property type “PropertyBase” has no predefined properties and ismerely the anchor from which all other property types are derived andthrough which all derived property types are interrelated (beingcommonly derived from the single property type). The Extension typeproperties define which Item the extension extends as well asidentification to distinguish one extension from another as an Item mayhave multiple extensions.

ItemFolder is a subtype of the Item Item type that, in addition to theproperties inherited from Item, features a Relationship for establishinglinks to its members (if any), whereas both IdentityKey and Property aresubtypes of PropertyBase. CategoryRef, in turn, is a subtype ofIdentityKey.

b) Core Schema

Various embodiments of the storage platform of the present inventionfurther comprise a Core Schema that provides a conceptual framework fortop-level Items type structures. FIG. 8A is a block diagram illustratingItems in the Core Schema, and FIG. 8B is a block diagram illustratingthe property types in the Core Schema. The distinction made betweenfiles with different extensions (*.com, *.exe, *.bat, *.sys, etc.) andother such criteria in file-and-folder-based systems is analogous to thefunction of the Core Schema. In the Item-based hardware/softwareinterface system, the Core Schema defines a set of core Item types that,directly (by Item type) or indirectly (by Item subtype), characterizeall Items into one or more Core Schema Item types which the Item-basedhardware/software interface system understands and can directly processin a predetermined and predictable way. The predefined Item typesreflect the most common Items in the Item-based hardware/softwareinterface system and thus a level of efficiency is gained by theItem-based hardware/software interface system understanding thesepredefined Item types that comprise the Core Schema.

In certain embodiments, the Core Schema is not extendable-that is, noadditional Item types can be subtyped directly from the Item type in theBase Schema except for the specific predefined derived Item types thatare part of the Core Schema. By preventing extensions to the Core Schema(that is, by preventing the addition of new Items to the Core Schema),the storage platform mandates the use of the Core Schema Item typessince every subsequent Item type is necessarily a subtype of a CoreSchema Item type. This structure enables a reasonable degree offlexibility in defining additional Item types while also preserving thebenefits of having a predefined set of core Item types.

For various embodiments of the present invention, and in reference toFIG. 8A, the specific Item types supported by the Core Schema mayinclude one or more of the following:

-   -   Categories: Items of this Item Type (and subtypes derived        therefrom) represent valid Categories in the Item-based        hardware/software interface system.    -   Commodities: Items that are identifiable things of value.    -   Devices: Items having a logical structure that supports        information processing capabilities.    -   Documents: Items with content that is not interpreted by the        Item-based hardware/software interface system but is instead        interpreted by an application program corresponding to the        document type.    -   Events: Items that record certain occurrences in the        environment.    -   Locations: Items representing physical locations (e.g.,        geographical locations).    -   Messages: Items of communication between two or more principals        (defined below).    -   Principals: Items having at least one definitively provable        identity aside from an ItemId (e.g., the identification of a        person, organization, group, household, authority, service,        etc.).    -   Statements: Items having special information regarding the        environment including, without limitation, policies,        subscriptions, credentials, and so forth.

Likewise, and in reference to FIG. 8B, the specific property typessupported by the Core Schema may include one or more of the following:

-   -   Certificates (derived from the foundational PropertyBase type in        the Base Schema)    -   Principal Identity Keys (derived from the IdentityKey type in        the Base Schema)    -   Postal Address (derived from the Property type in the Base        Schema)    -   Rich Text (derived from the Property type in the Base Schema)    -   EAddress (derived from the Property type in the Base Schema)    -   IdentitySecurityPackage (derived from the Relationship type in        the Base Schema)    -   RoleOccupancy (derived from the Relationship type in the Base        Schema)    -   BasicPresence (derived from the Relationship type in the Base        Schema)        These Items and Properties are further described by their        respective properties set forth in FIG. 8A and FIG. 8B.

5. Relationships

Relationships are binary relationships where one Item is designated assource and the other Item as target. The source Item and the target Itemare related by the relationship. The source Item generally controls thelife-time of the relationship. That is, when the source Item is deleted,the relationship between the Items is also deleted.

Relationships are classified into: Containment and Referencerelationships. The containment relationships control the life-time ofthe target Items, while the reference relationships do not provide anylife-time management semantics. FIG. 12 illustrates the manner in whichrelationships are classified.

The Containment relationship types are further classified into Holdingand Embedding relationships. When all holding relationships to an Itemare removed, the Item is deleted. A holding relationship controls thelife-time of the target through a reference counting mechanism. Theembedding relationships enable modeling of compound Items and can bethought of as exclusive holding relationships. An Item can be a targetof one or more holding relationships; but an Item can be target ofexactly one embedding relationship. An Item that is a target of anembedding relationship can not be a target of any other holding orembedding relationships.

Reference relationships do not control the lifetime of the target Item.They may be dangling—the target Item may not exist. Referencerelationships can be used to model references to Items anywhere in theglobal Item name space (i.e. including remote data stores).

Fetching an Item does not automatically fetch its relationships.Applications must explicitly request the relationships of an Item. Inaddition, modifying a relationship does not modify the source or thetarget Item; similarly, adding a relationship does not affect thesource/target Item.

a) Relationship Declaration

The explicit relationship types are defined with the following elements:

-   -   A relationship name is specified in the Name attribute.    -   Relationship type, one of the following: Holding, Embedding,        Reference. This is specified in the Type attribute.    -   Source and target endpoints. Each endpoint specifies a name and        the type of the referenced Item.    -   The source endpoint field is generally of type ItemID (not        declared) and it must reference an Item in the same data store        as the relationship instance.    -   For Holding and Embedding relationships, the target endpoint        field must be of type ItemIDReference and it must reference an        Item in the same store as the relationship instance. For        Reference relationships the target endpoint can be of any        ItemReference type and can reference Items in other storage        platform data stores.    -   Optionally one or more fields of a scalar or PropertyBase type        can be declared. These fields may contain data associated with        the relationship.    -   Relationship instances are stored in a global relationships        table.    -   Every relationship instance is uniquely identified by the        combination (source ItemID, relationship ID). The relationship        ID is unique within a given source ItemID for all relationships        sourced in a given Item regardless of their type.

The source Item is the owner of the relationship. While an Itemdesignated as owner controls the life time of the relationship, therelationship itself is separate from the Items it relates. The storageplatform API 322 provides mechanisms for exposing relationshipsassociated with an Item.

Here is an example of a relationship declaration: <RelationshipName=″Employment″ BaseType=″Reference″ > <Source Name=″Employee″ItemType=″Contact.Person″/> <Target Name=″Employer″ItemType=″Contact.Organization″ ReferenceType=″ItemIDReference″/><Property Name=″StartDate″ Type=″the storage platformTypes.DateTime″/><Property Name=″EndDate″ Type=″the storage platformTypes.DateTime″/><Property Name=″Office″ Type=″the storage platformTypes.DateTime″/></Relationship>

This is an example of a Reference relationship. The relationship can notbe created if the person Item that is referenced by the source referencedoes not exist. Also, if the person Item is deleted, the relationshipinstances between the person and organization are deleted. However, ifthe Organization Item is deleted, the relationship is not deleted and itis dangling.

b) Holding Relationship

Holding relationships are used to model reference count based life-timemanagement of the target Items.

An Item can be a source endpoint for zero or more relationships toItems. An Item that is not an embedded Item can be a target of in one ormore holding relationships.

The target endpoint reference type must be ItemIDReference and it mustreference an Item in the same store as the relationship instance.

Holding relationships enforce lifetime management of the targetendpoint. The creation of a holding relationship instance and the Itemthat it is targeting is an atomic operation. Additional holdingrelationship instances can be created that are targeting the same Item.When the last holding relationship instance with a given Item as targetendpoint is deleted the target Item is also deleted.

The types of the endpoint Items specified in the relationshipdeclaration will generally be enforced when an instance of therelationship is created. The types of the endpoint Items can not bechanged after the relationship is established.

Holding relationships play a key role in forming the Item namespace.They contain the “Name” property that defines the name of the targetItem relative to the source Item. This relative name is unique for allthe holding relationships sourced from a given Item. The ordered list ofthis relative names starting from the root Item to a given Item formsthe full name to the Item.

The holding relationships form a directed acyclic graph (DAG). When aholding relationship is created the system ensures that a cycle is notcreated, thus ensuring that the Item namespace forms a DAG.

While the holding relationship controls the life time of the targetItem, it does not control the operational consistency of the targetendpoint Item. The target Item is operationally independent from theItem that owns it through a holding relationship. Copy, Move, Backup andother operations on an Item that is a source of a holding relationshipdo not affect the Item that is a target of the same relationship—forexample that is, backing up a Folder Item does not automatically backupall the Items in the folder (targets of the FolderMember relationship).

The following is an example of a holding relationship: <RelationshipName=″FolderMembers″ BaseType=″Holding″> <Source Name=″Folder″ItemType=″Base.Folder″/> <Target Name=″Item″ ItemType=″Base.Item″ReferenceType=″ItemIDReference″/> </Relationship>

The FolderMembers relationship enables the concept of a Folder as ageneric collection of Items.

c) Embedding Relationships

Embedding relationships model the concept of exclusive control of thelifetime of the target Item. They enable the concept of compound Items.

The creation of an embedding relationship instance and the Item that itis targeting is an atomic operation. An Item can be a source of zero ormore embedding relationship. However, an Item can be a target of one andonly one embedding relationship. An Item that is a target of anembedding relationship can not be a target of a holding relationship.

The target endpoint reference type must be ItemIDReference and it mustreference an Item in the same data store as the relationship instance.

The types of the endpoint Items specified in the relationshipdeclaration will generally be enforced when an instance of therelationship is created. The types of the endpoint Items can not bechanged after the relationship is established.

Embedding relationships control the operational consistency of thetarget endpoint. For example the operation of serializing of an Item mayinclude serialization of all the embedding relationships that sourcefrom that Item as well as all of their targets; copying an Item alsocopies all its embedded Items.

The following is an example declaration: <RelationshipName=″ArchiveMembers″ BaseType=″Embedding″> <Source Name=″Archive″ItemType=″Zip.Archive″/> <Target Name=″Member″ ItemType=″Base.Item ″ReferenceType=″ItemIDReference″/> <Property Name=″ZipSize″ Type=″thestorage platformTypes.bigint″/> <Property Name=″SizeReduction″ Type=″thestorage platformTypes.float″/> </Relationship>

d) Reference Relationships

The reference relationship does not control life time of the Item itreferences. Even more, the reference relationships do not guarantee theexistence of the target, nor do they guarantee the type of the target asspecified in the relationship declaration. This means that the referencerelationships can be dangling. Also, the reference relationship canreference Items in other data stores. Reference relationships can bethought of as a concept similar to links in web pages.

An example of reference relationship declaration is the following:<Relationship Name=″DocumentAuthor″ BaseType=″Reference″> <SourcItemType=″Document″ ItemType=″Base.Document″/> <Target ItemType=″Author″ItemType=″Base.Author″ ReferenceType=″ItemIDReference″/> <PropertyType=″Role″ Type=″Core.CategoryRef″/> <Property Type=″DisplayName″Type=″the storage platformTypes.nvarchar(256)″/> </Relationship>

Any reference type is allowed in the target endpoint. The Items thatparticipate in a reference relationship can be of any Item type.

Reference relationships are used to model most non-lifetime managementrelationships between Items. Since the existence of the target is notenforced, the reference relationship is convenient to modelloosely-coupled relationships. The reference relationship can be used totarget Items in other data stores including stores on other computers.

e) Rules and Constraints

The following additional rules and constraints apply for relationships:

-   -   An Item must be a target of (exactly one embedding relationship)        or (one or more holding relationships). One exception is the        root Item. An Item can be a target of zero or more reference        relationships    -   An Item that is a target of embedding relationship can not be        source of holding relationships. It can be a source of reference        relationships.    -   An Item can not be a source of holding relationship if it is        promoted from file. It can be a source of embedding        relationships and reference relationships.    -   An Item can that is promoted from a file can not be a target of        an embedding relationship.

f) Ordering of Relationships

In at least one embodiment, the storage platform of the presentinvention supports ordering of relationships. The ordering is achievedthrough a property named “Order” in the base relationship definition.There is no uniqueness constraint on the Order field. The order of therelationships with the same “order” property value is not guaranteed,however it is guaranteed that they may be ordered after relationshipswith lower “order” value and before relationships with higher “order”field value.

Applications can get the relationships in the default order by orderingon the combination (SourceItemID, RelationshipID, Order). Allrelationship instances sourced from a given Item are ordered as a singlecollection regardless of the type of the relationships in thecollection. This however guarantees that all relationships of a giventype (e.g., FolderMembers) are an ordered subset of the relationshipcollection for a given Item.

The data store API 312 for manipulating relationships implement a set ofoperations that support ordering of relationships. The following termsare introduced to help explain the operations:

-   -   RelFirst is the first relationship in the ordered collection        with order value OrdFirst;    -   RelLast is the last relationship in the ordered collection with        order value OrdLast;    -   RelX is a given relationship in the collection with order value        OrdX;    -   RelPrev is a closest relationship in the collection to RelX with        order value OrdPrev smaller then OrdX; and    -   RelNext is a closest relationship in the collection to RelX with        order value OrdNext greater then OrdX

The operations include but are not limited to:

-   -   InsertBeforeFirst (SourceItemID, Relationship) inserts the        relationship as the first relationship in the collection. The        value of the “Order” property of the new relationship may be        smaller then OrdFirst.    -   InsertAfterLast (SourceItemID, Relationship) inserts the        relationship as the last relationship in the collection. The        value of the “Order” property of the new relationship may be        greater then OrdLast.    -   InsertAt (SourceItemID, ord, Relationship) inserts a        relationship with the specified value for the “Order” property.    -   InsertBefore (SourceItemID, ord, Relationship) inserts the        relationship before the relationship with the given order value.        The new relationship may be assigned “Order” value that is        between OrdPrev and ord, noninclusive.    -   InsertAfter (SourceItemID, ord, Relationship) inserts the        relationship after the relationship with the given order value.        The new relationship may be assigned “Order” value that is        between ord and OrdNext, non-inclusive.    -   MoveBefore (SourceItemID, ord, RelationshipID) moves the        relationship with given relationship ID before the relationship        with specified “Order” value. The relationship may be assigned a        new “Order” value that is between OrdPrev and ord,        non-inclusive.

MoveAfter (SourceItemID, ord, RelationshipID) moves the relationshipwith given relationship ID after the relationship with specified “Order”value. The relationship may be assigned a new order value that isbetween ord and OrdNext, non-inclusive.

As previously mentioned, every Item must be a member of an Item Folder.In terms of Relationships, every Item must have a relationship with anItem Folder. In several embodiments of the present invention, certainrelationships are represented by Relationships existing between theItems.

As implemented for various embodiments of the present invention, aRelationship provides a directed binary relationship that is “extended”by one Item (the source) to another Item (the target). A Relationship isowned by the source Item (the Item that extended it), and thus theRelationship is removed if the source is removed (e.g., the Relationshipis deleted when the source Item is deleted). Moreover, in certaininstances, a Relationship may share ownership of (co-own) the targetItem, and such ownership might be reflected in the IsOwned property (orits equivalent) of the Relationship (as shown in FIG. 7 for theRelationship property type). In these embodiments, creation of a newIsOwned Relationship automatically increments a reference count on thetarget Item, and deletion of such a Relationship may decrement thereference count on the target Item. For these specific embodiments,Items continue to exist if they have a reference count greater thanzero, and are automatically deleted if and when the count reaches zero.Again, an Item Folder is an Item that has (or is capable of having) aset of Relationships to other Items, these other Items comprising themembership of the Item Folder. Other actual implementations ofRelationships are possible and anticipated by the present invention toachieve the functionality described herein.

Regardless of actual implementation, a Relationship is a selectableconnection from one object to another. The ability for an Item to belongto more than one Item Folder, as well as to one or more Categories, andwhether these Items, Folders, and Categories are public or private, isdetermined by the meanings given to the existence (or lack thereof) inan Item-based structure. These logical Relationships are the meaningsassigned to a set of Relationships, regardless of physicalimplementation, which are specifically employed to achieve thefunctionality described herein. Logical Relationships are establishedbetween the Item and its Item Folder(s) or Categories (and vice versa)because, in essence, Item Folders and Categories are each a special typeof Item. Consequently, Item Folders and Categories can be acted upon thesame way as any other Item—copied, added to an email message, embeddedin a document, and so and so forth without limitation—and Item Foldersand Categories can be serialized and de-serialized (imported andexported) using the same mechanisms as for other Items. (For example, inXML all Items might have a serialization format, and this format appliesequally to Item Folders, Categories, and Items.)

The aforementioned Relationships, which represent the relationshipbetween an Item and it Item Folder(s) can logically extend from the Itemto the Item Folder, from the Item Folder to the Item, or both. ARelationship that logically extends from an Item to an Item Folderdenotes that the Item Folder is public to that Item and shares itsmembership information with that Item; conversely, the lack of a logicalRelationship from an Item to an Item Folder denotes that the Item Folderis private to that Item and does not share its membership informationwith that Item. Similarly, a Relationship that logically extends from anItem Folder to an Item denotes that the Item is public and sharable tothat Item Folder, whereas the lack of a logical Relationship from theItem Folder to the Item denotes that the Item is private andnon-sharable. Consequently, when an Item Folder is exported to anothersystem, it is the “public” Items that are shared in the new context, andwhen an Item searches its Items Folders for other, sharable Items, it isthe “public” Item Folders that provide the Item with informationregarding sharable Items that belong thereto.

FIG. 9 is a block diagram illustrating an Item Folder (which, again, isan Item itself), its member Items, and the interconnecting Relationshipsbetween the Item Folder and its member Items. The Item Folder 900 has asmembers a plurality of Items 902, 904, and 906. Item Folder 900 has aRelationship 912 from itself to Item 902 which denotes that the Item 902is public and sharable to Item Folder 900, its members 904 and 906, andany other Item Folders, Categories, or Items (not shown) that mightaccess Item Folder 900. However, there is no Relationship from Item 902to the Item Folder 900 which denotes that Item Folder 900 is private toItem 902 and does not share its membership information with Item 902.Item 904, on the other hand, does have a Relationship 924 from itself toItem Folder 900 which denotes that the Item Folder 900 is public andshares its membership information with Item 904. However, there is noRelationship from the Item Folder 900 to Item 904 which denotes thatItem 904 is private and not sharable to Item Folder 900, its othermembers 902 and 906, and any other Item Folders, Categories, or Items(not shown) that might access Item Folder 900. In contrast with itsRelationships (or lack thereof) to Items 902 and 904, Item Folder 900has a Relationship 916 from itself to the Item 906 and Item 906 has aRelationship 926 back to Item Folder 900, which together denote thatItem 906 is public and sharable to Item Folder 900, its members 902 and904, and any other Item Folders, Categories, or Items (not shown) thatmight access Item Folder 900, and that Item Folder 900 is public andshares its membership information with Item 906.

As previously discussed, the Items in an Item Folder do not need toshare a commonality because Item Folders are not “described.”Categories, on the other hand, are described by a commonality that iscommon to all of its member Items. Consequently the membership of aCategory is inherently limited to Items having the described commonalityand, in certain embodiments, all Items meeting the description of aCategory are automatically made members of the Category. Thus, whereasItem Folders allow trivial type structures to be represented by theirmembership, Categories allow membership based on the definedcommonality.

Of course Category descriptions are logical in nature, and therefore aCategory may be described by any logical representation of types,properties, and/or values. For example, a logical representation for aCategory may be its membership to comprise Items have one of twoproperties or both. If these described properties for the Category are“A” and “B”, then the Categories membership may comprise Items havingproperty A but not B, Items having property B but not A, and Itemshaving both properties A and B. This logical representation ofproperties is described by the logical operator “OR” where the set ofmembers described by the Category are Items having property A OR B.Similar logical operands (including without limitation “AND”, “XOR”, and“NOT” alone or in combination) can also be used describe a category aswill be appreciated by those of skill in the art.

Despite the distinction between Item Folders (not described) andCategories (described), Categories Relationship to Items and ItemsRelationship to Categories essentially the same way as disclosed hereinabove for Item Folders and Items in many embodiments of the presentinvention.

FIG. 10 is a block diagram illustrating a Category (which, again, is anItem itself), its member Items, and the interconnecting Relationshipsbetween the Category and its member Items. The Category 1000 has asmembers a plurality of Items 1002, 1004, and 1006, all of which sharesome combination of common properties, values, or types 1008 asdescribed (commonality description 1008′) by the Category 1000. Category1000 has a Relationship 1012 from itself to Item 1002 which denotes thatthe Item 1002 is public and sharable to Category 1000, its members 1004and 1006, and any other Categories, Item Folders, or Items (not shown)that might access Category 1000. However, there is no Relationship fromthe Item 1002 to the Category 1000 which denotes that Category 1000 isprivate to Item 1002 and does not share its membership information withItem 1002. Item 1004, on the other hand, does have a Relationship 1024from itself to Category 1000 which denotes that the Category 1000 ispublic and shares its membership information with Item 1004. However,there is no Relationship extended from Category 1000 to the Item 1004which denotes that Item 1004 is private and not sharable to Category1000, its other members 1002 and 1006, and any other Categories, ItemFolders, or Items (not shown) that might access Category 1000. Incontrast to its Relationships (or lack thereof) with Items 1002 and1004, Category 1000 has a Relationship 1016 from itself to Item 1006 andItem 1006 has a Relationship 1026 back to Category 1000, whichaltogether denotes that Item 1006 is public and sharable to Category1000, its Item members 1002 and 1004, and any other Categories, ItemFolders, or Items (not shown) that might access Category 1000, and thatthe Category 1000 is public and shares its membership information withItem 1006.

Finally, because Categories and Item Folders are themselves Items, andItems may Relationship to each other, Categories may Relationship toItem Folders and vice versa, and Categories, Item Folders, and Items canRelationship to other Categories, Item Folders, and Item respectively incertain alternative embodiments. However, in various embodiments, ItemFolder structures and/or Category structures are prohibited, at thehardware/software interface system level, from containing cycles. WhereItem Folder and Category structures are akin to directed graphs, theembodiments that prohibit cycles are akin to directed acyclic graphs(DAGs) which, by mathematical definition in the art of graph theory, aredirected graphs wherein no path starts and ends at the same vertex.

6. Extensibility

The storage platform is intended to be provided with an initial set ofschemas 340, as described above. In addition, however, in at least someembodiments, the storage platform allows customers, includingindependent software vendor (ISVs), to create new schemas 344 (i.e. newItem and Nested Element types). This section addresses the mechanism forcreating such schemas by extending the Item types and Nested Elementtypes (or simply “Element” types) defined in the initial set of schemas340.

Preferably, extension of the initial set of Item and Nested Elementtypes is constrained as follows:

-   -   an ISV is allowed to introduce new Item types, i.e. subtype        Base.Item;    -   an ISV is allowed to introduce new Nested Element types, i.e.        subtype Base.NestedElement;    -   an ISV is allowed to introduce new extensions, i.e. subtype        Base.NestedElement; but,    -   an ISV cannot subtype any types (Item, Nested Element, or        Extension types) defined by the initial set of storage platform        schemas 340.

Since an Item type or Nested Element type defined by the initial set ofstorage platform schemas may not exactly match an ISV application'sneed, it is necessary to allow ISVs to customize the type. This isallowed with the notion of Extensions. Extensions are strongly typedinstances but (a) they cannot exist independently and (b) they must beattached to an Item or Nested Element.

In addition to addressing the need for schema extensibility, Extensionsare also intended to address the “multi-typing” issue. Since, in someembodiments, the storage platform may not support multiple inheritanceor overlapping subtypes, applications can use Extensions as a way tomodel overlapping type instances (e.g. Document is a legal document aswell a secure document).

a) Item Extensions

To provide Item extensibility, the data model further defines anabstract type named Base.Extension. This is a root type for thehierarchy of extension types. Applications can subtype Base.Extension tocreate specific extension types.

The Base.Extension type is defined in the Base schema as follows: <TypeName=″Base.Extension″ IsAbstract=″True″> <Propety Name=″ItemID″Type=″the storage platformTypes.uniqueidentified″ Nullable=″false″MultiValued=″false″/> <Property Name=″ExtensionID″ Type=″the storageplatformTypes.uniqueidentified″ Nullable=″false″ MultiValued=″false″/></Type>

The ItemID field contains the ItemID of the item that the extension isassociated with. An Item with this ItemID must exist. The extension cannot be created if the item with the given ItemID does not exist. Whenthe Item is deleted all the extensions with the same ItemID are deleted.The tuple (ItemID, ExtensionID) uniquely identifies an extensioninstance.

The structure of an extension type is similar to that of an item type:

-   -   Extension types have fields;    -   Fields can be of primitive or nested element types; and    -   Extension types can be sub-typed.

The following restrictions apply for extension types

-   -   Extensions can not be sources and targets of relationships;    -   Extension type instances can not exist independently from an        item; and    -   Extension types can not be used as field types in the storage        platform type definitions

There are no constraints on the types of extensions that can beassociated with a given Item type. Any extension type is allowed toextend any item type. When multiple extension instances are attached toan item, they are independent from each other in both structure andbehavior.

The extension instances are stored and accessed separately from theitem. All extension type instances are accessible from a globalextension view. An efficient query can be composed that will return allthe instances of a given type of extension regardless of what type ofitem they are associated with. The storage platform APIs provides aprogramming model that can store, retrieve and modify extensions onitems.

The extension types can be type sub-typed using the storage platformsingle inheritance model. Deriving from an extension type creates a newextension type. The structure or the behavior of an extension cannotoverride or replace the structure or behaviors of the item typehierarchy. Similar to Item types, Extension type instances can bedirectly accessed through the view associated with the extension type.The ItemID of the extension indicates which item they belong to and canbe used to retrieve the corresponding Item object from the global Itemview. The extensions are considered part of the item for the purposes ofoperational consistency. The Copy/Move, Backup/Restore and other commonoperations that the storage platform defines may operate on theextensions as part of the item.

Consider the following example. A Contact type is defined in the WindowsType set. <Type Name=″Contact″ BaseType=“Base.Item” > <PropertyName=″Name″ Type=″String″ Nullable=″false″ MultiValued=″false″/><Property Name=″Address″ Type=″Address″ Nullable=″true″MultiValued=″false″/> </Type>

A CRM application developer would like to attach a CRM applicationextension to the contacts stored in the storage platform. Theapplication developer would define a CRM extension that would containthe additional data structure that the application can manipulate. <TypeName=″CRMExtension″ BaseType=″Base.Extension″ > <PropertyName=″CustomerID″ Type=″String″ Nullable=″false″ MultiValued=″false″/>... </Type>

An HR application developer may want to also attach additional data withthe Contact. This data is independent from the CRM application data.Again the application developer can create an extension <TypeName=″HRExtension″ EBaseType=″Base.Extension″ > <PropertyName=″EmployeeID″ Type=″String″ Nullable=″false″ MultiValued=″false″/>... </Type>

CRMExtension and HRExtension are two independent extensions that can beattached to Contact items. They are created and accessed independentlyof each other.

In the above example, the fields and methods of the CRMExtension typecannot override fields or methods of the Contact hierarchy. It should benoted that instances of the CRMExtension type can be attached to Itemtypes other than Contact.

When the Contact item is retrieved, its item extensions are notautomatically retrieved. Given a Contact item, its related itemextensions can be accessed by querying the global extension view forextensions with the same ItemId.

All CRMExtension extensions in the system can be accessed through theCRMExtension type view, regardless of which item they belong to. Allitem extension of an item share the same item id. In the above example,the Contact item instance and the attached CRMExtension and HRExtensioninstances the same ItemID.

The following table summarizes the similarities and differences betweenItem, Extension and NestedElement types: Item vs. Item Extension vsNestedElement Item Item Extension NestedElement Item ID Has its own itemid Shares the item id Does not have its of the item own item id. Nestedelement is part of the item Storage Item hierarchy is Item extensionStored with item stored in its own hierarchy is stored tables in its owntables Query/Search Can query item Can query item Can generally betables extension tables queried only within the containing item contextQuery/Search Can search across Can search across Can generally onlyscope all instances of an all instances of an search within nested itemtype item extension type element type instances of a singe (containing)item Relationship Can have Rela- No Relation- No Relationships tosemantics tionships to ships to item nested elements items extensionsAssociation Can be related to Can generally only Related to item via toitems other items via be related via fields. Nested holding, embeddedextensions. The elements are part of and soft extension semantics theitem Relationships is similar to embedded item semantics

b) Extending NestedElement types

Nested Element types are not extended with the same mechanism as theItem types. Extensions of nested elements are stored and accessed withthe same mechanisms as fields of nested element types.

The data model defines a root for nested element types named Element:<Type Name=″Element″ IsAbstract=″True″> <Property Name=″ElementID″Type=″the storage platformTypes.uniqueidentifier″ Nullable=″false″MultiValued=″false″/> </Type>

The NestedElement type inherits from this type. The NestedElementelement type additionally defines a field that is a multi-set ofElements. <Type Name=″NestedElement″ BaseType=″Base.Element″IsAbstract=″True″> <Property Name=″Extensions″ Type=″Base.Element″Nullable=″false″ MultiValued=″true″/> </Type>

The NestedElement extensions are different from item extensions in thefollowing ways:

-   -   Nested element extensions are not extension types. They do not        belong to the extension type hierarchy that is rooted in the        Base.Extension type.    -   Nested element extensions are stored along with the other fields        of the item and are not globally accessible—a query can not be        composed that retrieves all instances of a given extension type.    -   These extensions are stored the same way as other nested        elements (of the item) are stored. Like other nested sets, the        NestedElement extensions are stored in a UDT. They are        accessible through the Extensions field of the nested element        type.    -   The collection interfaces used to access multi-valued properties        is also used for accessing and iterating over set of type        extensions.

The following table summarizes and compares Item Extensions andNestedElement extensions. Item extensions vs NestedElement extensionsItem Extension NestedElement Extension Storage Item extension Storedlike hierarchy is nested elements stored in its own tables Query/SearchCan query item Can generally only be extension queried within the tablescontaining item context Query/Search Can search across all Can generallyonly search scope instances of an item within nested element typeextension type instances of a singe (containing) item ProgrammabilityNeed special extension NestedElement extensions APIs and special arelike any other multi- querying on valued field of nested extensiontables element; normal nested element type APIs are used Behavior Canassociate behavior No behavior permitted (?) Relationship NoRelationships No Relationships to semantics to item extensionsNestedElement extensions Item ID Shares the item Does not have its ownitem id of the item id. NestedElement extension is part of the item

F. Database Engine

As mentioned above, the data store is implemented on a database engine.In the present embodiment, the database engine comprises a relationaldatabase engine that implements the SQL query language, such as theMicrosoft SQL Server engine, with object relational extensions. Thissection describes the mapping of the data model that the data storeimplements to the relational store and provides information on thelogical API consumed by storage platform clients, in accordance with thepresent embodiment. It is understood, however, that a different mappingmay be employed when a different database engine is employed. Indeed, inaddition to implementing the storage platform conceptual data model on arelational database engine, it can also be implemented on other types ofdatabases, e.g. object-oriented and XML databases.

An object-oriented (OO) database system provides persistence andtransactions for programming language objects (e.g. C++, Java). Thestorage platform notion of an “item” maps well to an “Object” inobject-oriented systems, though embedded collections would have to beadded to Objects. Other storage platform type concepts, like inheritanceand nested element types, also map object-oriented type systems.Object-oriented systems typically already support object identity;hence, item identity can be mapped to object identity. The itembehaviors (operations) map well to object methods. However,object-oriented systems typically lack organizational capabilities andare poor in searching. Also, object-oriented systems to do not providesupport for unstructured and semi-structured data. To support thecomplete storage platform data model described herein, concepts likerelationships, folders, and extensions would need to be added to theobject data model. In addition, mechanisms like promotions,synchronization, notifications, and security would need to beimplemented.

Similar to object-oriented systems, XML databases, based on XSD (XMLSchema Definition), support a single-inheritance based type system. Theitem type system of the present invention could be mapped to the XSDtype model. XSDs also do not provide support for behaviors. The XSDs foritems would have to be augmented with item behaviors. XML databases dealwith single XSD documents and lack organization and broad searchcapabilities. As with object-oriented databases, to support the datamodel described herein, other concepts like relationships, and folderswould need to be incorporated into such XML databases; also, mechanismslike synchronization, notifications and security would need to beimplemented.

In regard to the following subsections, a few illustrations are providedto facilitate the general information disclosed: FIG. 13 is a diagramillustrating a notification mechanism. FIG. 14 is a diagram illustratingan example in which two transactions are both inserting a new recordinto the same B-Tree. FIG. 15 illustrates a data change detectionprocess. FIG. 16 illustrates an exemplary directory tree. FIG. 17 showsan example in which an existing folder of a directory-based file systemis moved into the storage platform data store.

1. Data Store Implementation Using UDTs

In the present embodiment, the relational database engine 314, which inone embodiment comprises the Microsoft SQL Server engine, supportsbuilt-in scalar types. Built-in scalar types are “native” and “simple”.They are native in the sense that the user cannot define their own typesand they are simple in that they cannot encapsulate a complex structure.User-defined types (hereinafter: UDTs) provide a mechanism for typeextensibility above and beyond the native scalar type system by enablingusers to extend the type system by defining complex, structured types.Once defined by a user, a UDT can be used anywhere in the type systemthat a built-in scalar type might be used

In accordance with an aspect of the present invention, the storageplatform schemas are mapped to UDT classes in the database engine store.Data store Items are mapped to UDT classes deriving from the Base.Itemtype. Like Items, Extensions are also mapped to UDT classes and make useof inheritance. The root Extension type is Base.Extension, from whichall Extension types are derived.

A UDT is a CLR class—it has state (i.e., data fields) and behavior(i.e., routines). UDTs are defined using any of the managedlanguages—C#, VB.NET, etc. UDT methods and operators can be invoked inT-SQL against an instance of that type. A UDT can be: the type of acolumn in a row, the type of a parameter of a routine in T-SQL, or thetype of a variable in T-SQL

The mapping of storage platform schemas to UDT classes is fairlystraightforward at a high level. Generally, a storage platform Schema ismapped to a CLR namespace. A storage platform Type is mapped to a CLRclass. The CLR class inheritance mirrors the storage platform Typeinheritance, and a storage platform Property is mapped to a CLR classproperty.

2. Item Mapping

Given the desirability for Items to be globally searchable, and thesupport in the relational database of the present embodiment forinheritance and type substitutability, one possible implementation forItem storage in the database store would be to store all Items in asingle table with a column of type Base.Item. Using typesubstitutability, Items of all types could be stored, and searches couldbe filtered by Item type and sub-type using Yukon's “is of (Type)”operator.

However, due to concerns about the overhead associated with such anapproach, in the present embodiment, the Items are divided by top-leveltype, such that Items of each type “family” are stored in a separatetable. Under this partitioning scheme, a table is created for each Itemtype inheriting directly from Base.Item. Types inheriting below theseare stored in the appropriate type family table using typesubstitutability, as described above. Only the first level ofinheritance from Base.Item is treated specially.

A “shadow” table is used to store copies of globally searchableproperties for all Items. This table may be maintained by the Update( )method of the storage platform API, through which all data changes aremade. Unlike the type family tables, this global Item table containsonly the top-level scalar properties of the Item, not the full UDT Itemobject. The global Item table allows navigation to the Item objectstored in a type family table by exposing an ItemID and a TypeID. TheItemID will generally uniquely identify the Item within the data store.The TypeID may be mapped using metadata, which is not described here, toa type name and the view containing the Item. Since finding an Item byits ItemID may be a common operation, both in the context of the globalItem table and otherwise, a GetItem( ) function is provided to retrievean Item object given an Item's ItemID.

For convenient access and to hide implementation details to the extentpossible, all queries of Items might be against views built on the Itemtables described above. Specifically, views may be created for each Itemtype against the appropriate type family table. These type views mayselect all Items of the associated type, including sub-types. Forconvenience, in addition to the UDT object, the views may expose columnsfor all of the top-level fields of that type, including inheritedfields.

3. Extension Mapping

Extensions are very similar to Items and have some of the samerequirements. As another root type supporting inheritance, Extensionsare subject to many of the same considerations and trade-offs instorage. Because of this, a similar type family mapping is applied toExtensions, rather than a single table approach. Of course, in otherembodiments, a single table approach could be used. In the presentembodiment, an Extension is associated with exactly one Item by ItemID,and contains an ExtensionID that is unique in the context of the Item.As with Items, a function might be provided to retrieve an Extensiongiven its identity, which consists of an ItemID and ExtensionID pair. AView is created for each Extension type, similar to the Item type views.

4. Nested Element Mapping

Nested Elements are types that can be embedded in Items, Extensions,Relationships, or other Nested Elements to form deeply nestedstructures. Like Items and Extensions, Nested Elements are implementedas UDT's, but they are stored within an Items and Extensions. Therefore,Nested Elements have no storage mapping beyond that of their Item andExtension containers. In other words, there are no tables in the systemwhich directly store instances of NestedElement types, and there are noviews dedicated specifically to Nested Elements.

5. Object Identity

Each entity in the data model, i.e., each Item, Extension andRelationship, has a unique key value. An Item is uniquely identified byits ItemId. An Extension is uniquely identified by a composite key of(ItemId, ExtensionId). A Relationship is identified by a composite key(ItemId, RelationshipId). ItemId, ExtensionId and RelationshipId areGUID values.

6. SQL Object Naming

All objects created in the data store can be stored in a SQL schema namederived from the storage platform schema name. For example, the storageplatform Base schema (often called “Base”) may produce types in the“[System.Storage]” SQL schema such as “[System.Storage].Item”. Generatednames are prefixed by a qualifier to eliminate naming conflicts. Whereappropriate, an exclamation character (!) is used as a separator foreach logical part of the name. The table below outlines the namingconvention used for objects in the data store. Each schema element(Item, Extension, Relationship and View), is listed along with thedecorated naming convention used to access instances in the data store.Object Name Decoration Description Example Master Item Master!ItemProvides a [System.Storage]. Search View summary of items [Master!Item]in the current item domain. Typed Item ItemType Provides all[AcmeCorp.Doc]. search view property data [OfficeDoc] from item and anyparent type(s). Master Master!Extension Provides a [System.Storage].Extension summary of all [Master!Extension] Search View extensions inthe current item domain. Typed Extension!extensionType Provides all[AcmeCorp.Doc]. extension property data for [Extension!StickyNote]search view extension. Master Master!Relationship Provides a[System.Storage]. Relationship summary of all [Master!Relationship] Viewrelationships in the current item domain. RelationshipRelationship!relationship Provides all data [AcmeCorp.Doc]. view Nameassociated with a [Relationship!AuthorsFrom given relationship Document]View View!viewName Provides the [AcmeCorp.Doc]. columns/types[View!DocumentTitles] based on the schema view definition.

7. Column Naming

When mapping any object model into a store, the possibility of namingcollisions occur due to additional information stored along with anapplication object. In order to avoid naming collisions, all non-typespecific columns (columns which do not map directly to a named Propertyin a type declaration) is be prefixed with an underscore ( ) character.In the present embodiment, underscore ( ) characters are disallowed asthe beginning character of any identifier property. Further, in order tounify naming between CLR and the data store, all properties of a storageplatform types or schema element (relationship, etc.) should have acapitalized first character.

8. Search Views

Views are provided by the storage platform for searching stored content.A SQL view is provided for each Item and Extension type. Further, viewsare provided to support Relationships and Views (as defined by the DataModel). All SQL views and underlying tables in the storage platform areread-only. Data may be stored or changed using the Update( ) method ofthe storage platform API, as described more fully below.

Each view explicitly defined in a storage platform schema (defined bythe schema designer, and not automatically generated by the storageplatform) is accessible by the named SQL view[<schema-name>].[View!<view-name>]. For example, a view named“BookSales” in the schema “AcmePublisher.Books” would be accessibleusing the name “[AcmePublisher.Books].[View!BookSales]”. Since theoutput format of a view is custom on a per-view basis (defined by anarbitrary query provided by the party defining the view), the columnsare directly mapped based on the schema view definition.

All SQL search views in the storage platform data store use thefollowing ordering convention for columns:

-   -   Logical “key” column (s) of view result such as ItemId,        ElementId, RelationshipId, . . .    -   Metadata information on type of result such as TypeId.    -   Change tracking columns such as CreateVersion, UpdateVersion, .        . .    -   Type specific column(s) (Properties of the declared type)    -   Type specific views (family views) also contain an object column        which returns the object

Members of each type family are searchable using a series of Item views,with there being one view per Item type in the data store. FIG. 28 is adiagram illustrating the concept of an Item search view.

a) Item

Each Item search view contains a row for each instance of an Item of thespecific type or its subtypes. For example, the view for Document couldreturn instances of Document, LegalDocument and ReviewDocument. Giventhis example, the Item views can be conceptualized as shown in FIG. 29.

(1) Master Item Search View

Each instance of a storage platform data store defines a special Itemview called the Master Item View. This view provides summary informationon each Item in the data store. The view provides one column per Itemtype property, a column which described the type of the Item and severalcolumns which are used to provide change tracking and synchronizationinformation. The master item view is identified in a data store usingthe name “[System.Storage]. [Master!Item]”. Column Type DescriptionItemId ItemId The storage platform identity of the Item _TypeId TypeIdThe TypeId of the Item - identifies the exact type of the Item and canbe used to retrieve information on the type using a Metadata catalog._RootItemId ItemId The ItemId of the first non-embedded ancestor thatcontrols the lifetime of this item. <global . . . Global change trackingchange information tracking> <Item n/a One column per Item type props>property

(2) Typed Item Search Views

Each Item type also has a search view. While similar to the root Itemview, this view also provides access to the Item object via the “_Item”column. Each typed item search view is identified in a data store usingthe name [schemaName].[itemTypeName]. For example [AcmeCorp.Doc].[OfficeDoc]. Column Type Description ItemId ItemId The storage platformidentity of the Item <type change . . . Type change tracking tracking>information <parent props> <property One column per parent specific>property <item props> <property One column per exclusive specific>property of this type _Item CLR type of Item CLR object - type ofdeclared Item

b) Item Extensions

All Item Extensions in a WinFS Store are also accessible using searchviews.

(1) Master Extension Search View

Each instance of a data store defines a special Extension view calledthe Master Extension View. This view provides summary information oneach Extension in the data store. The view has a column per Extensionproperty, a column which describes the type of the Extension and severalcolumns which are used to provide change tracking and synchronizationinformation. The master extension view is identified in a data storeusing the name “[System. Storage]. [Master!Extension]”. Column TypeDescription ItemId ItemId The storage platform identity of the Item withwhich this extension is associated ExtensionId ExtensionId Id of thisextension instance (GUID) _TypeId TypeId The TypeId of the Extension -identifies the exact type of the extension and can be used to retrieveinformation on the extension using the Metadata catalog. <global change. . . Global change tracking tracking> information <ext properties><property One column per Extension specific> type property

(2) Typed Extension Search Views

Each Extension type also has a search view. While similar to the masterextension view, this view also provides access to the Item object viathe _Extension column. Each typed extension search view is identified ina data store using the name [schemaName].[Extension!extensionTypeName].For example [AcmeCorp.Doc].[Extension!OfficeDocExt]. Column TypeDescription ItemId ItemId The storage platform identity of the Item withwhich this extension is associated ExtensionId ExtensionId Id of thisextension instance (GUID) <type change . . . Type change trackingtracking> information <parent <property One column per parent props>specific> property <ext props> <property One column per exclusivespecific> property of this type _Extension CLR type of CLR object - typeof Extension declared Extension instance

c) Nested Elements

All nested elements are stored within Items, Extensions or Relationshipsinstances. As such, they are accessed by querying the appropriate Item,Extension, or Relationship search view.

d) Relationships

As discussed above, Relationships form the fundamental unit of linkingbetween Items in a storage platform data store.

(1) Master Relationship Search View

Each data store provides a Master Relationship View. This view providesinformation on all relationship instances in the data store. The masterrelationship view is identified in a data store using the name“[System.Storage].[Master!Relationship]”. Column Type Description ItemIdItemId Identity of source endpoint (ItemId) RelationshipIdRelationshipId The id of the (GUID) relationship instance _RelTypeIdRelationshipTypeId The RelTypeId of the Relationship - identifies thetype of the relationship instance using the Metadata catalog. <globalchange . . . Global change tracking> tracking information.TargetItemReference ItemReference Identity of target endpoint_Relationship Relationship Instance of the Relationship object for thisinstance

(2) Relationship Instance Search Views

Each declared Relationship also has a search view which returns allinstances of the particular relationship. While similar to the masterrelationship view, this view also provides named columns for eachproperty of the relationship data. Each relationship instance searchview is identified in a data store using the name[schemaName].[Relationship!relationshipName]. For example[AcmeCorp.Doc]. [Relationship!DocumentAuthor]. Column Type DescriptionItemId ItemId Identify of source endpoint (ItemId) RelationshipIdRelationshipId The id of the (GUID) relationship instance <type change .. . Type change tracking> tracking information TargetItemReferenceItemReference Identity of target endpoint <source name> ItemId Namedproperty of source endpoint identity (alias for ItemId) <target name>ItemReference or Named property of derived class target endpointidentity (alias and cast for TargetItemReference) <rel property><property One column per specific> property of the relationshipdefinition _Relationship CLR type of CLR object - type of Relationshipdeclare Relationship instance

e)

9. Updates

All views in the storage platform data store are read-only. In order tocreate a new instance of a data model element (item, extension orrelationship), or to update an existing instance, the ProcessOperationor ProcessUpdategram methods of the storage platform API must be used.The ProcessOperation method is a single stored procedure defined by thedata store which consumes an “operation” that details an action to beperformed. The ProcessUpdategram method is a stored procedure whichtakes an ordered set of operations, known as an “updategram”, whichcollectively detail a set of actions to be performed.

The operation format is extensible and provides various operations overthe schema elements. Some common operations include:

-   -   1. Item operations:        -   a. CreateItem (Creates a new item in the context of an            embedding or holding relationship)        -   b. UpdateItem (updates an existing Item)    -   2. Relationship operations:        -   a. CreateRelationship (creates an instance of a reference or            holding relationship)        -   b. UpdateRelationship (updates a relationship instance)        -   c. DeleteRelationship (removes a relationship instances)    -   3. Extension operations:        -   a. CreateExtension (adds an extension to an existing Item)        -   b. UpdateExtension (updates an existing extension)        -   c. DeleteExtension (deletes an extension)

10. Change Tracking & Tombstones

Change tracking and tombstone services are provided by the data store,as discussed more fully below. This section provides an outline of thechange tracking information exposed in a data store.

a) Change Tracking

Each search view provided by the data store contains columns used toprovide change tracking information; the columns are common across allItem, Extension and Relationship views. Storage platform Schema Views,defined explicitly by schema designers, do not automatically providechange tracking information—such information is provided indirectlythrough the search views on which the view itself is built.

For each element in the data store, change tracking information isavailable from two places—the “master” element view and the “typed”element view. For example, change tracking information on theAcmeCorp.Document.Document Item type is available from the Master ItemView “[System.Storage].[Master!Item]” and typed Item search view[AcmeCorp.Document].[Document].

(1) Change Tracking in “Master” Search Views

Change tracking information in the master search views providesinformation on the creation and update versions of an element,information on which sync partner created the element, which syncpartner last updated the element and the version numbers from eachpartner for creation and update. Partners in sync relationships(described below) are identified by partner key. A single UDT objectnamed _ChangeTrackingInfo of type[System.Storage.Store].ChangeTrackingInfo contains all this information.The type is defined in the System.Storage schema. _ChangeTrackingInfo isavailable in all global search views for Item, Extension andRelationship. The type definition of ChangeTrackingInfo is: <TypeName=″ChangeTrackingInfo″ BaseType=″Base.NestedElement″> <FieldPropertyName=″CreationLocalTS″ Type=″SqlTypes.SqlInt64″ Nullable=″False″ /><FieldProperty Name=″CreatingPartnerKey″ Type=″SqlTypes.SqlInt32″Nullable=″False″ /> <FieldProperty Name=″CreatingPartnerTS″Type=″SqlTypes.SqlInt64″ Nullable=″False″ /> <FieldPropertyName=″LastUpdateLocalTS″ Type=″SqlTypes.SqlInt64″ Nullable=″False″ /><FieldProperty Name=″LastUpdatingPartnerKey″ Type=″SqlTypes.SqlInt32″Nullable=″False″ /> <FieldProperty Name=″LastUpdatingPartnerTS″Type=″SqlTypes.SqlInt64″ Nullable=″False″ /> </Type>

These properties contain the following information: Column Description_CreationLocalTS Creation time stamp by the local machine_CreatingPartnerKey PartnerKey of the partner who created this entity.If the entity was locally created, this is the local machine'sPartnerKey. _CreatingPartnerTS Timestamp of the time at which thisentity was created at the partner corresponding to _CreatingPartnerKey._LastUpdateLocalTS Local timestamp corresponding to the update time atthe local machine _LastUpdatingPartnerKey PartnerKey of the partner wholast updated this entity. If the last update to the entity was donelocally, this is the local machine's PartnerKey. _LastUpdatingPartnerTSTimestamp of the time at which this entity was updated at the partnercorresponding to _LastUpdatingPartnerKey.

(2) Change Tracking in “Typed” Search Views

In addition to providing the same information as the global search view,each typed search view provides additional information recording thesync state of each element in the sync topology. Column Type Description<global change . . . Information from global change tracking> tracking_ChangeUnitVersions MultiSet<ChangeUnitVersion> Description of versionnumbers of the change units within the particular element_ElementSyncMetadata ElementSyncMetadata Additional version-independentmetadata about this item that is only of interest to the Synchronizationruntime. _VersionSyncMetadata VersionSyncMetadata Additionalversion-specific metadata about this version that is only of interest tothe Synchronization runtime

b) Tombstones

The data store provides tombstone information for Items, Extensions andRelationships. The tombstone views provide information about both liveand tombstoned entities (items, extensions and relationships) in oneplace. The item and extension tombstone views do not provide access tothe corresponding object, while the relationship tombstone view providesaccess to the relationship object (the relationship object is NULL inthe case of a tombstoned relationship).

(1) Item Tombstones

Item tombstones are retrieved from the system via the view [System.Storage]. [Tombstone!Item]. Column Type Description ItemId ItemIDIdentity of the Item _TypeID TypeId Type of the Item <Item properties> .. . Properties defined for all items _RootItemId ItemID ItemID of thefirst non-embedding item which contains this item. _ChangeTrackingInfoCLR instance of Change tracking type information for ChangeTrackingInfothis item _IsDeleted BIT This is a flag that is 0 for live items, and 1for tombstoned items. _DeletionWallclock UTCDATETIME The UTC wall clockdate time accord- ing to the partner which deleted the item. It is NULLif the Item is live.

(2) Extension Tombstones

Extension tombstones are retrieved from the system using the view[System.Storage].[Tombstone!Extension]. Extension change trackinginformation is similar to that provided for Items with the addition ofthe ExtensionId property. Column Type Description ItemID ItemID Identityof the Item which owns the Extension ExtensionId ExtensionId ExtensionId of the Extension _TypeID TypeId Type of the extension_ChangeTrackingInfo CLR instance of Change tracking infor- type mationfor this extension ChangeTrackingInfo _IsDeleted BIT This is a flag thatis 0 for live items, and 1 for tombstoned extensions. _DeletionWallclockUTCDATETIME The UTC wall clock date time according to the partner whichdeleted the extension. It is NULL if the extension is live.

(3) Relationships Tombstone

Relationship tombstones are retrieved from the system via the view[System.Storage].[Tombstone!Relationship]. Relationships tombstoneinformation is similar to that provided for Extensions. However,additional information is provided on the target ItemRef of therelationship instance. In addition, the relationship object is alsoselected. Column Type Description ItemID ItemID Identity of the Itemwhich owned the rela- tionship (identity of relationship sourceendpoint) RelationshipId RelationshipId RelationshipId of therelationship _TypeID TypeId Type of the relationship _ChangeTrackingInfoCLR instance of Change tracking type information for ChangeTrackingInfothis relationship _IsDeleted BIT This is a flag that is 0 for liveitems, and 1 for tombstoned extensions. _DeletionWallclock UTCDATETIMEThe UTC wall clock date time according to the partner which deleted therelationship. It is NULL if the relationship is live. _Relationship CLRinstance of a This is the relationship Relationship object for liverela- tionship. It is NULL for tombstoned relationships.TargetItemReference ItemReference Identity of target endpoint

(4) Tombstone Cleanup

In order to prevent unbounded growth of tombstone information, the datastore provides a tombstone cleanup task. This task determines whentombstone information may be discarded. The task computes a bound on thelocal create/update version and then truncates the tombstone informationby discarding all earlier tombstone versions.

11. Helper APIs and Functions

The Base mapping also provides a number of helper functions. Thesefunctions are supplied to aid common operations over the data model.

a) Function [System.Storage].GetItem Returns an Item object given anItemId // Item GetItem (ItemId ItemId)

b) Function [System.Storage].GetExtension // Returns an extension objectgiven an ItemId and ExtensionId // Extension GetExtension (ItemIdItemId, ExtensionId ExtensionId)

c) Function [System.Storage].GetRelationship // Returns an relationshipobject given an ItemId and RelationshipId // RelationshipGetRelationship (ItemId ItemId, RelationshipId RelationshipId)

12. Metadata

There are two types of metadata represented in the Store: instancemetadata (the type of an Item, etc), and type metadata.

a) Schema Metadata

Schema metadata is stored in the data store as instances of Item typesfrom the Meta schema.

b) Instance Metadata

Instance metadata is used by an application to query for the type of anItem and finds the extensions associated with an Item. Given the ItemIdfor an Item, an application can query the global item view to return thetype of the Item and use this value to query the Meta.Type view toreturn information on the declared type of the Item. For example, //Return metadata Item object for given Item instance // SELECT m._Item ASmetadataInfoObj FROM [System.Storage].[Item] i INNER JOIN [Meta].[Type]m ON i._TypeId = m.ItemId WHERE i.ItemId = @ItemId

G. Security

In general, all securable objects arrange their access rights using theaccess mask format shown in the FIG. 26. In this format, the low-order16 bits are for object-specific access rights, the next 7 bits are forstandard access rights, which apply to most types of objects, and the 4high-order bits are used to specify generic access rights that eachobject type can map to a set of standard and object-specific rights. TheACCESS_SYSTEM_SECURITY bit corresponds to the right to access theobject's SACL.

In the access mask structure of FIG. 26, item specific rights are placedin the Object Specific Rights section (low order 16-bits). Because inthe present embodiment, the storage platform exposes two sets of APIs toadminister security—Win32 and the storage platform API, the file systemobject specific rights must be considered in order to motivate thedesign of the storage platform object specific rights.

The security model for the storage platform of the present invention isfully described in the related applications incorporated by referenceearlier herein. In this regard, FIG. 27 (parts a, b, and c) depicts anew identically protected security region being carved out of anexisting security region, in accordance with one embodiment of asecurity model.

H. Notifications and Change Tracking

According to another aspect of the present invention, the storageplatform provides a notifications capability that allows applications totrack data changes. This feature is primarily intended for applicationswhich maintain volatile state or execute business logic on data changeevents. Applications register for notifications on items, itemextensions and item relationships. Notifications are deliveredasynchronously after data changes have been committed. Applications mayfilter notifications by item, extension and relationship type as well astype of operation.

According to one embodiment, the storage platform API 322 provides twokinds of interfaces for notifications. First, applications register forsimple data change events triggered by changes to items, item extensionsand item relationships. Second, applications create “watcher” objects tomonitor sets of items, item extensions and relationships between items.The state of a watcher object can be saved and re-created after a systemfailure or after a system has gone off-line for an extended period oftime. A single notification may reflect multiple updates.

Additional details regarding this functionality can be found in therelated applications incorporated by reference earlier herein.

I. Synchronization

According to another aspect of the present invention, the storageplatform provides a synchronization service 330 that (i) allows multipleinstances of the storage platform (each with its own data store 302) tosynchronize parts of their content according to a flexible set of rules,and (ii) provides an infrastructure for third parties to synchronize thedata store of the storage platform of the present invention with withother data sources that implement proprietary protocols.

Storage platform-to-storage platform synchronization occurs among agroup of participating replicas. For example, with reference to FIG. 3,it may be desirable to provide synchronization between the data store302 of the storage platform 300 with another remote data store 338 underthe control of another instance of the storage platform, perhaps runningon a different computer system. The total membership of this group isnot necessarily known to any given replica at any given time.

Different replicas can make the changes independently (i.e.concurrently). The process of synchronization is defined as making everyreplica aware of the changes made by other replicas. Thissynchronization capability is inherently multi-master.

The synchronization capability of the present invention allows replicasto:

-   -   determine which changes another replica is aware of;    -   request information about changes that this replica is not aware        of;    -   convey information about changes that the other replica is not        aware of;    -   determine when two changes are in conflict with each other;    -   apply changes locally;    -   convey conflict resolutions to other replicas to ensure        convergence; and    -   resolve the conflicts based on specified policies for conflict        resolutions.

1. Storage Platform-to-Storage Platform Synchronization

The primary application of the synchronization service 330 of thestorage platform of the present invention is to synchronize multipleinstances of the storage platform (each with its own data store). Thesynchronization service operates at the level of the storage platformschemas (rather than the underlying tables of the database engine 314).Thus, for example, “Scopes” are used to define synchronization sets asdiscussed below.

The synchronization service operates on the principle of “net changes”.Rather than recording and sending individual operations (such as withtransactional replication), the synchronization service sends theend-result of those operations, thus often consolidating the results ofmultiple operations into a single resulting change.

The synchronization service does not in general respect transactionboundaries. In other words, if two changes are made to a storageplatform data store in a single transaction, there is no guarantee thatthese changes are applied at all other replicas atomically—one may showup without the other. The exception to this principle is that if twochanges are made to the same Item in the same transaction, then thesechanges are guaranteed to be sent and applied to other replicasatomically. Thus, Items are the consistency units of the synchronizationservice.

a) Synchronization (Sync) Controlling Applications

Any application can connect to the synchronization service and initiatea sync operation. Such an application provides all of the parametersneeded to perform synchronization (see sync profile below). Suchapplications are referred to herein as Sync Controlling Applications(SCAs).

When synchronizing two storage platform instances, sync is initiated onone side by an SCA. That SCA informs the local synchronization serviceto synchronize with the remote partner. On the other side, thesynchronization service is awoken by the messages sent by thesynchronization service from the originating machine. It responds basedon the persistent configuration information (see mappings below) presenton the destination machine. The synchronization service can be run onschedule or in response to events. In these cases, the synchronizationservice implementing the schedule becomes the SCA.

To enable synchronization, two steps need to be taken. First, the schemadesigner must annotate the storage platform schema with appropriate syncsemantics (designating Change Units as described below). Second,synchronization must be properly configured on all of the machineshaving an instance of the storage platform that is to participate in thesynchronization (as described below).

b) Schema Annotation

A fundamental concept of the synchronization service is that of a ChangeUnit. A Change Unit is a smallest piece of schema that is individuallytracked by the storage platform. For every Change Unit, thesynchronization service may be able to determine whether it changed ordid not change since the last sync.

Designating Change Units in the schema serves several purposes. First,it determines how chatty the synchronization service is on the wire.When a change is made inside a Change Unit, the entire Change Unit issent to the other replicas, since the synchronization service does notknow which part of the Change Unit was changed. Second, it determinesthe granularity of conflict detection. When two concurrent changes(these terms are defined in detail in subsequent sections) are made tothe same change unit, the synchronization service raises a conflict; onthe other hand, if concurrent changes are made to different changeunits, then no conflict is raised and the changes are automaticallymerged. Third, it strongly affects the amount of meta-data kept by thesystem. Much of the synchronization service meta-data is kept per-ChangeUnit; thus, making Change Units smaller increases the overhead of sync.

Defining Change Units requires finding the right trade-offs. For thatreason, the synchronization service allows schema designers toparticipate in the process.

In one embodiment, the synchronization service does not support ChangeUnits that are larger than an element. However, it does support theability for schema designers to specify smaller change units than anelement—namely, grouping multiple attributes of an element into aseparate Change Unit. In that embodiment, this is accomplished using thefollowing syntax: <Type Name=″Appointment″ MajorVersion=″1″MinorVersion=″0″ ExtendsType=″Base.Item″ Extends Version=″1″> <FieldName=″MeetingStatus“ Type=″the storage platformTypes.uniqueidentifierNullable=″False″/> <Field Name=″OrganizerName“ Type=″the storageplatformTypes.nvarchar(512)″ Nullable=″False″/> <FieldName=″OrganizerEmail“ Type=″the storage platformTypes.nvarchar(512)″TypeMajorVersion=″1“ MultiValued=″True″/> ... <ChangeUnitName=″CU_Status”> <Field Name=″MeetingStatus”/> </ChangeUnit><ChangeUnit Name=”CU_Organizer”/> <Field Name=”OrganizerName” /> <FieldName=”OrganizerEmail” /> </ChangeUnit> ... </Type>

c) Sync Configuration

A group of storage platform partners that wish to keep certain parts oftheir data in sync are referred to as a sync community. While themembers of the community want to stay in sync, they do not necessarilyrepresent the data in exactly the same way; in other words, syncpartners may transform the data they are synchronizing.

In a peer-to-peer scenario, it is impractical for peers to maintaintransformation mappings for all of their partners. Instead, thesynchronization service takes the approach of defining “CommunityFolders”. A community folder is an abstraction that represents ahypothetical “shared folder” that all community members aresynchronizing with.

This notion is best illustrated by an example. If Joe wants to keep MyDocuments folders of his several computers in sync, Joe defines acommunity folder called, say, JoesDocuments. Then, on every computer,Joe configures a mapping between the hypothetical JoesDocuments folderand the local My Documents folder. From this point on, when Joe'scomputers synchronize with each other, they talk in terms of documentsin JoesDocuments, rather than their local items. This way, all Joe'scomputers understand each other without having to know who the othersare—the Community Folder becomes the lingua franca of the synccommunity.

Configuring the synchronization service consists of three steps: (1)defining mappings between local folders and community folders; (2)defining sync profiles that determine what gets synchronized (e.g. whomto sync with and which subsets should be sent and which received); and(3) defining the schedules on which different sync profiles should run,or running them manually.

(1) Community Folder—Mappings

Community Folder mappings are stored as XML configuration files onindividual machines. Each mapping has the following schema:

/mappings/communityFolder

This element names the community folder that this mapping is for. Thename follows the syntax rules of Folders.

/mappings/localFolder

This element names the local folder that the mapping transforms into.The name follows the syntax rules of Folders. The folder must alreadyexist for the mapping to be valid. The items within this folder areconsidered for synchronization per this mapping.

/mappings/transformations

This element defines how to transform items from the community folder tothe local folder and back. If absent or empty, no transformations areperformed. In particular, this means that no IDs are mapped. Thisconfiguration is primarily useful for creating a cache of a Folder.

/mappings/transformations/mapIDs

This element requests that newly generated local IDs be assigned to allof the items mapped from the community folder, rather than reusingcommunity IDs. The Sync Runtime will maintain ID mappings to convertitems back and forth.

/mappings/transformations/localRoot

This element requests that all root items in the community folder bemade children of the specified root.

/mappings/runAs

This element controls under whose authority requests against thismapping are processed. If absent, sender is assumed.

/mappings/runAs/sender

The presence of this element indicates that the sender of messages tothis mapping must be impersonated, and requests processed under hiscredentials.

(2) Profiles

A Sync Profile is a total set of parameters needed to kick offsynchronization. It is supplied by an SCA to the Sync Runtime toinitiate sync. Sync profiles for storage platform-to-storage platformsynchronization contain the following information:

-   -   Local Folder, to serve as the source and destination for        changes;    -   Remote Folder name to synchronize with—this Folder must be        published from the remote partner by way of a mapping as defined        above;    -   Direction—the synchronization service supports send-only,        receive-only, and send-receive sync;    -   Local Filter—selects what local information to send to the        remote partner. Expressed as a the storage platform query over        the local folder;    -   Remote Filter—selects what remote information to retrieve from        the remote partner—expressed as a storage platform query over        the community folder;    -   Transformations—defines how to transform items to and from the        local format;    -   Local security—specifies whether the changes retrieved from the        remote endpoint are to be applied under the permissions of the        remote endpoint (impersonated) or the user initiating the sync        locally; and    -   Conflict resolution policy—specifies whether conflicts should be        rejected, logged, or automatically resolved—in the latter case,        it specifies which conflict resolver to use, as well as the        configuration parameters for it.

The synchronization service provides a runtime CLR class that allowssimple building of Sync Profiles. Profiles can also be serialized to andfrom XML files for easy storage (often alongside schedules). However,there is no standard place in the storage platform where all theprofiles are stored; SCAs are welcome to construct a profile on the spotwithout ever persisting it. Note that there is no need to have a localmapping to initiate sync. All sync information can be specified in theprofile. The mapping is, however, required in order to respond to syncrequests initiated by the remote side.

(3) Schedules

In one embodiment, the synchronization service does not provide its ownscheduling infrastructure. Instead, it relies on another component topeform this task—the Windows Scheduler available with the MicrosoftWindows operating system. The synchronization service includes acommand-line utility that acts as an SCA and triggers synchronizationbased on a sync profile saved in an XML file. This utility makes it veryeasy to configure the Windows Scheduler to run synchronization either onschedule, or in response to events such as user logon or logoff.

d) Conflict Handling

Conflict handling in the synchronization service is divided into threestages: (1) conflict detection, which occurs at change applicationtime—this step determines if a change can be safely applied; (2)automatic conflict resolution and logging—during this step (that takesplace immediately after the conflict is detected) automatic conflictresolvers are consulted to see if the conflict can be resolved—if not,the conflict can be optionally logged; and (3) conflict inspection andresolution—this step takes place if some conflicts have been logged, andoccurs outside of the context of the sync session—at this time, loggedconflicts can be resolved and removed from the log.

(1) Conflict Detection

In the present embodiment, the synchronization service detects two typesof conflicts: knowledge-based and constraint-based.

(a) Knowledge-Based Conflicts

A knowledge-based conflict occurs when two replicas make independentchanges to the same Change Unit. Two changes are called independent ifthey are made without knowledge of each other—in other words, theversion of the first is not covered by the knowledge of the second andvice versa. The synchronization service automatically detects all suchconflicts based on the replicas' knowledge as described above.

It is sometimes helpful to think of conflicts as forks in the versionhistory of a change unit. If no conflicts occur in the life of a changeunit, its version history is a simple chain—each change occurring afterthe previous one. In the case of a knowledge-based conflict, two changesoccur in parallel, causing the chain to split and become a version tree.

(b) Constraint-Based Conflicts

There are cases where independent changes violate an integrityconstraint when applied together. For instance, two replicas creating afile with the same name in the same directory could cause such aconflict to occur.

A constraint-based conflict involves two independent changes (just likea knowledge-based one), but they do not affect the same change unit.Rather, they affect different change units but with a constraintexisting between them.

The synchronization service detects constraint violations at changeapplication time and raises constraint-based conflicts automatically.Resolving constraint-based conflicts usually requires custom code thatmodifies the changes in such as way as to not violate the constraint;The synchronization service does not provide a general-purpose mechanismfor doing so.

(2) Conflict Processing

When a conflict is detected, the synchronization service can take one ofthree actions (selected by the sync initiator in the Sync Profile): (1)reject the change, returning it back to sender; (2) log a conflict intoa conflict log; or (3) resolve the conflict automatically.

If the change is rejected, the synchronization service acts as if thechange did not arrive at the replica. A negative acknowledgement is sentback to the originator. This resolution policy is primarily useful onhead-less replicas (such as file servers) where logging conflicts is notfeasible. Instead, such replicas force the others to deal with theconflicts by rejecting them.

Sync initiators configure conflict resolution in their Sync Profiles.The synchronization service supports combining multiple conflictresolvers in a single profile in the following ways—first, by specifyinga list of conflict resolvers to be tried one after another, until one ofthem succeeds; and second, by associating conflict resolvers withconflict types, e.g. directing update-update knowledge-based conflictsto one resolver, but all the other conflicts to the log.

(a) Automatic Conflict Resolution

The synchronization service provides a number of default conflictresolvers. This list includes:

-   -   local-wins: disregard incoming changes if in conflict with        locally stored data;    -   remote-wins: disregard local data if in conflict with incoming        changes;    -   last-writer-wins: pick either local-wins or remote-wins per        change unit based on the timestamp of the change (note that the        synchronization service in general does not rely on clock        values; this conflict resolver is the sole exception to that        rule);    -   Deterministic: pick a winner in a manner that is guaranteed to        be the same on all replicas, but not otherwise meaningful—one        embodiment of the synchronization services uses lexicographic        comparisons of partner IDs to implement this feature.

In addition, ISVs can implement and install their own conflictresolvers. Custom conflict resolvers may accept configurationparameters; such parameters must be specified by the SCA in the ConflictResolution section of the Sync Profile.

When a conflict resolver handles a conflict, it returns the list ofoperations that need to be performed (in lieu of the conflicting change)back to the runtime. The synchronization service then applies theseoperations, having properly adjusted remote knowledge to include whatthe conflict handler has considered.

It is possible that another conflict is detected while applying theresolution. In such a case, the new conflict must be resolved before theoriginal processing resumes.

When thinking of conflicts as branches in the version history of anitem, conflict resolutions can be viewed as joins—combining two branchesto form a single point. Thus, conflict resolutions turn versionhistories into DAGs.

(b) Conflict Logging

A very particular kind of a conflict resolver is the Conflict Logger.The synchronization service logs conflicts as Items of typeConflictRecord. These records are related back to the items that are inconflict (unless the items themselves have been deleted). Each conflictrecord contains: the incoming change that caused the conflict; the typeof the conflict: update-update, update-delete, delete-update,insert-insert, or constraint; and the version of the incoming change andthe knowledge of the replica sending it. Logged conflicts are availablefor inspection and resolution as described below.

(c) Conflict Inspection and Resolution

The synchronization service provides an API for applications to examinethe conflict log and to suggest resolutions of the conflicts in it. TheAPI allows application to enumerate all conflicts, or conflicts relatedto a given Item. It also allows such applications to resolve loggedconflicts in one of three ways: (1) remote wins—accepting the loggedchange and overwriting the conflicting local change; (2) localwins—ignoring conflicting parts of the logged change; and (3) suggestnew change—where the application proposes a merge that, in its opinion,resolves the conflict. Once conflicts are resolved by an application,the synchronization service removes them from the log.

(d) Convergence of Replicas and Propagation of Conflict Resolutions

In complex synchronization scenarios, the same conflict can be detectedat multiple replicas. If this occurs, several things can happen: (1) theconflict can be resolved on one replica, and the resolution be sent tothe other; (2) the conflict is resolved on both replicas automatically;or (3) the conflict is resolved on both replicas manually (through theconflict inspection API).

To ensure convergence, the synchronization service forwards conflictresolutions to other replicas. When a change that resolves a conflictarrives at a replica, the synchronization service automatically findsany conflict records in the log that are resolved by this update andeliminates them. In this sense, a conflict resolution at one replica isbinding on all the other replicas.

If different winners are chosen by different replicas for the sameconflict, the synchronization service applies the principle of bindingconflict resolution and picks one of the two resolutions to win over theother automatically. The winner is picked in a deterministic fashionthat is guaranteed to produce the same results at all times (oneembodiment uses replica ID lexicographic comparisons).

If different “new changes” are suggested by different replicas for thesame conflict, the synchronization service treats this new conflict as aspecial conflict and uses the Conflict Logger to prevent it frompropagating to other replicas. Such situation commonly arises withmanual conflict resolution.

2. Synchronizing to Non-Storage Platform Data Stores

According to another aspect of the storage platform of the presentinvention, the storage platform provides an architecture for ISVs toimplement Sync Adapters that allow the storage platform to synchronizeto legacy systems such as Microsoft Exchange, AD, Hotmail, etc. SyncAdapters benefit from the many Sync Service provided by thesynchronization service, as described below.

Despite the name, Sync Adapters do not need to be implemented asplug-ins into some storage platform architecture. If desired, a “syncadapter” can simply be any application that utilizes the synchronizationservice runtime interfaces to obtain services such as change enumerationand application.

In order to make it simpler for others to configure and runsynchronization to a given backend, Sync Adapter writers are encouragedto expose the standard Sync Adapter interface, which runs sync given theSync Profile as described above. The profile provides configurationinformation to the adapter, some of which adapters pass to the SyncRuntime to control runtime services (e.g. the Folder to synchronize).

a) Sync Services

The synchronization service provides a number of sync services toadapter writers. For the rest of this section, it is convenient to referto the machine on which the storage platform is doing synchronization asthe “client” and the non-storage platform backend that the adapter istalking to as the “server”.

(1) Change Enumeration

Based on the change-tracking data maintained by the synchronizationservice, Change Enumeration allows sync adapters to easily enumerate thechanges that have occurred to a data store Folder since the last timesynchronization with this partner was attempted.

Changes are enumerated based on the concept of an “anchor”—an opaquestructure that represents information about the last synchronization.The anchor takes the form of the storage platform Knowledge, asdescribed in the proceeding sections. Sync adapters utilizing changeenumeration services fall into two broad categories: those using “storedanchors” vs. those using “supplied anchors”.

The distinction is based on where the information about the last sync isstored—on the client, or on the server. It is often easier for adaptersto store this information on the client—the backend is often not capableof conveniently storing this information. On the other hand, if multipleclients synchronize to the same backend, storing this information on theclient is inefficient and in some cases incorrect—it makes one clientunaware of the changes that the other client has already pushed up tothe server. If an adapter wants to use a server-stored anchor, theadapter needs to supply it back to the storage platform at the time ofchange enumeration.

In order for the storage platform to maintain the anchor (either forlocal or remote storage), the storage platform needs to be made aware ofthe changes that were successfully applied at the server. These and onlythese changes can be included in the anchor. During change enumeration,Sync Adapters use an Acknowledgement interface to report which changeswere successfully applied. At the end of synchronization, adapters usingsupplied anchors must read the new anchor (which incorporates all of thesuccessfully-applied changes) and send it to their backend.

Often, Adapters need to store adapter-specific data along with the itemsthey insert into the storage platform data store. Common examples ofsuch data are remote IDs and remote versions (timestamps). Thesynchronization service provides a mechanism for storing this data, andChange Enumeration provides a mechanism to receive this extra data alongwith the changes being returned. This eliminates the need for adaptersto re-query the database in most cases.

(2) Change Application

Change Application allows Sync Adapters to apply changes received fromtheir backend to the local storage platform. Adapters are expected totransform the changes to the storage platform schema. FIG. 24illustrates the process by which storage platform API classes aregenerated from the storage platform Schema.

The primary function of change application is to automatically detectconflicts. As in the case of Storage Platform-to-Storage Platform sync,a conflict is defined as two overlapping changes being made withoutknowledge of each other. When adapters use Change Application, they mustspecify the anchor with respect to which conflict detection isperformed. Change Application raises a conflict if an overlapping localchange that is not covered by the adapter's knowledge is detected.Similar to Change Enumeration, adapters may use either stored orsupplied anchors. Change Application supports efficient storage ofadapter-specific meta-data. Such data may be attached by the adapter tothe changes being applied, and might be stored by the synchronizationservice. The data might be returned on next change enumeration.

(3) Conflict Resolution

The Conflict Resolution mechanisms described above (logging andautomatic resolution options) are available to sync adapters as well.Sync adapters may specify the policy for conflict resolution whenapplying changes. If specified, conflicts may be passed on to thespecified conflict handler and resolved (if possible). Conflicts canalso be logged. It is possible that the adapter may detect a conflictwhen attempting to apply a local change to the backend. In such a case,the adapter may still pass the conflict on to the Sync Runtime to beresolved according to policy. In addition, Sync Adapters may requestthat any conflicts detected by the synchronization service be sent backto them for processing. This is particularly convenient in the casewhere the backend is capable of storing or resolving conflicts.

b) Adapter Implementation

While some “adapters” are simply applications utilizing runtimeinterfaces, adapters are encouraged to implement the standard adapterinterfaces. These interfaces allow Sync Controlling Applications to:request that the adapter perform synchronization according to a givenSync Profile; cancel on-going synchronization; and receive progressreporting (percentage complete) on an ongoing sync.

3. Security

The synchronization service strives to introduce as little as possibleinto the security model implemented by the storage platform. Rather thandefining new rights for synchronization, existing rights are used.Specifically,

-   -   anyone who can read a data store Item can enumerate changes to        that item;    -   anyone who can write to a data store Item can apply changes to        that item; and    -   anyone who can extend a data store Item can associate sync        meta-data with that item.

The synchronization service does not maintain secure authorshipinformation. When a change is made at replica A by user U and forwardedto replica B, the fact that the change was originally made at A (or byU) is lost. If B forwards this change to replica C, this is done underB's authority, not that of A. This leads to the following limitation: ifa replica is not trusted to make its own changes to an item, it cannotforward changes made by others.

When the synchronization service is initiated, it is done by a SyncControlling Application. The synchronization service impersonates theidentity of the SCA and performs all operations (both locally andremotely) under that identity. To illustrate, observe that user U cannotcause the local synchronization service to retrieve changes from aremote storage platform for items that user U does not have read access.

4. Manageability

Monitoring a distributed community of replicas is a complex problem. Thesynchronization service may use a “sweep” algorithm to collect anddistribute information about the status of the replicas. The propertiesof the sweep algorithm ensure that information about all configuredreplicas is eventually collected and that failing (non-responsive)replicas are detected.

This community-wide monitoring information is made available at everyreplica. Monitoring tools can be run at an arbitrarily-chosen replica toexamine this monitoring information and make administrative decisions.Any configuration changes must be made directly at the affectedreplicas.

J. Traditional File System Interoperability

As mentioned above, the storage platform of the present invention is, inat least some embodiments, intended to be embodied as an integral partof the hardware/software interface system of a computer system. Forexample, the storage platform of the present invention may be embodiedas an integral part of an operating system, such as the MicrosoftWindows family of operating systems. In that capacity, the storageplatform API becomes a part of the operating system APIs through whichapplication programs interact with the operating system. Thus, thestorage platform becomes the means through which application programsstore information on the operating system, and the Item based data modelof the storage platform therefore replaces the traditional files systemof such an operating system. For example, as embodied in the MicrosoftWindows family of operating systems, the storage platform might replacethe NTFS file system implemented in that operating system. Presently,application programs access the services of the NTFS file system throughthe Win32 APIs exposed by the Windows family of operating systems.

Recognizing, however, that completely replacing the NTFS file systemwith the storage platform of the present invention would requirerecoding of existing Win32-based application programs and that suchrecoding may be undesirable, it would be beneficial for the storageplatform of the present invention to provide some interoperability withexisting file systems, such as NTFS. In one embodiment of the presentinvention, therefore, the storage platform enables application programswhich rely on the Win32 programming model to access the contents of boththe data store of the storage platform as well as the traditional NTFSfile system. To this end, the storage platform uses a naming conventionthat is a superset of the Win32 naming conventions to facilitate easyinteroperability. Further, the storage platform supports accessing filesand directories stored in a storage platform volume through the Win32API.

Additional details regarding this functionality can be found in therelated applications incorporated by reference earlier herein.

K. Storage Platform API

The storage platform comprises an API that enables application programsto access the features and capabilities of the storage platformdiscussed above and to access items stored in the data store. Thissection describes one embodiment of a storage platform API of thestorage platform of the present invention. Details regarding thisfunctionality can be found in the related applications incorporated byreference earlier herein, with some of this information summarized belowfor convenience.

Referring to FIG. 18, a Containment Folder is an item which containsholding Relationships to other Items and is the equivalent of the commonconcept of a file system folder. Each Item is “contained” within atleast one containment folder.

FIG. 19 illustrates the basic architecture of the storage platform API,in accordance with the present embodiment. The storage platform API usesSQLClient 1900 to talk to the local data store 302 and may also useSQLClient 1900 to talk to remote data stores (e.g., data store 340). Thelocal store 302 may also talk to the remote data store 340 using eitherDQP (Distributed Query Processor) or through the the storage platformsynchronization service (“Sync”) described above. The storage platformAPI 322 also acts as the bridge API for data store notifications,passing application's subscriptions to the notification engine 332 androuting notifications to the application (e.g., application 350 a, 350b, or 350 c), as also described above. In one embodiment, the storageplatform API 322 may also define a limited “provider” architecture sothat it can access data in Microsoft Exchange and AD.

FIG. 20 schematically represents the various components of the storageplatform API. The storage platform API consists of the followingcomponents: (1) data classes 2002, which represent the storage platformelement and item types, (2) runtime framework 2004, which manages objectpersistence and provides support classes 2006; and (3) tools 2008, whichare used to generate CLR classes from the storage platform schemas.

The hierarchy of classes resulting from a given schema directly reflectsthe hierarchy of types in that schema. As an example, consider the Itemtypes defined in the Contacts schema as shown in FIG. 21A and FIG. 21B.

FIG. 22 illustrates the runtime framework in operation. The runtimeframework operates as follows:

-   -   1. An application 350 a, 350 b, or 350 c binds to an item in the        storage platform.    -   2. The framework 2004 creates an ItemContext object 2202        corresponding to the bound item and returns it to the        application.    -   3. The application submits a Find on this ItemContext to get a        collection of Items; the returned collection is conceptually an        object graph 2204 (due to relationships).    -   4. The application changes, deletes, and inserts data.    -   5. The application saves the changes by calling the Update( )        method.

FIG. 23 illustrates the execution of a “FindAll” operation.

FIG. 24 illustrates the process by which storage platform API classesare generated from the storage platform Schema

FIG. 25 illustrates the schema on which the File API is based. Thestorage platform API includes a namespace for dealing with file objects.This namespace is called System.Storage.Files. The data members of theclasses in System.Storage.Files directly reflect the information storedin the storage platform store; this information is “promoted” from thefile system objects or may be created natively using the Win32 API. TheSystem.Storage.Files namespace has two classes: FileItem andDirectoryItem. The members of these classes and methods thereof can bereadily divined by looking at the schema diagram in FIG. 25. FileItemand DirectoryItem are read-only from the storage platform API. In orderto modify them, one has to use the Win32 API or classes in System.IO.

In regard to APIs, a programming interface (or more simply, interface)may be viewed as any mechanism, process, protocol for enabling one ormore segment(s) of code to communicate with or access the functionalityprovided by one or more other segment(s) of code. Alternatively, aprogramming interface may be viewed as one or more mechanism(s),method(s), function call(s), module(s), object(s), etc. of a componentof a system capable of communicative coupling to one or moremechanism(s), method(s), function call(s), module(s), etc. of othercomponent(s). The term “segment of code” in the preceding sentence isintended to include one or more instructions or lines of code, andincludes, e.g., code modules, objects, subroutines, functions, and soon, regardless of the terminology applied or whether the code segmentsare separately compiled, or whether the code segments are provided assource, intermediate, or object code, whether the code segments areutilized in a runtime system or process, or whether they are located onthe same or different machines or distributed across multiple machines,or whether the functionality represented by the segments of code areimplemented wholly in software, wholly in hardware, or a combination ofhardware and software.

Notionally, a programming interface may be viewed generically, as shownin FIG. 30A or FIG. 30B. FIG. 30A illustrates an interface Interface1 asa conduit through which first and second code segments communicate. FIG.30B illustrates an interface as comprising interface objects I1 and I2(which may or may not be part of the first and second code segments),which enable first and second code segments of a system to communicatevia medium M. In the view of FIG. 30B, one may consider interfaceobjects I1 and I2 as separate interfaces of the same system and one mayalso consider that objects I1 and I2 plus medium M comprise theinterface. Although FIGS. 30A and 30B show bi-directional flow andinterfaces on each side of the flow, certain implementations may onlyhave information flow in one direction (or no information flow asdescribed below) or may only have an interface object on one side. Byway of example, and not limitation, terms such as applicationprogramming interface (API), entry point, method, function, subroutine,remote procedure call, and component object model (COM) interface, areencompassed within the definition of programming interface.

Aspects of such a programming interface may include the method wherebythe first code segment transmits information (where “information” isused in its broadest sense and includes data, commands, requests, etc.)to the second code segment; the method whereby the second code segmentreceives the information; and the structure, sequence, syntax,organization, schema, timing and content of the information. In thisregard, the underlying transport medium itself may be unimportant to theoperation of the interface, whether the medium be wired or wireless, ora combination of both, as long as the information is transported in themanner defined by the interface. In certain situations, information maynot be passed in one or both directions in the conventional sense, asthe information transfer may be either via another mechanism (e.g.information placed in a buffer, file, etc. separate from informationflow between the code segments) or non-existent, as when one codesegment simply accesses functionality performed by a second codesegment. Any or all of these aspects may be important in a givensituation, e.g., depending on whether the code segments are part of asystem in a loosely coupled or tightly coupled configuration, and sothis list should be considered illustrative and non-limiting.

This notion of a programming interface is known to those skilled in theart and is clear from the foregoing detailed description of theinvention. There are, however, other ways to implement a programminginterface, and, unless expressly excluded, these too are intended to beencompassed by the claims set forth at the end of this specification.Such other ways may appear to be more sophisticated or complex than thesimplistic view of FIGS. 30A and 30B, but they nonetheless perform asimilar function to accomplish the same overall result. We will nowbriefly describe some illustrative alternative implementations of aprogramming interface.

Factoring: A communication from one code segment to another may beaccomplished indirectly by breaking the communication into multiplediscrete communications. This is depicted schematically in FIGS. 31A and31B. As shown, some interfaces can be described in terms of divisiblesets of functionality. Thus, the interface functionality of FIGS. 30Aand 30B may be factored to achieve the same result, just as one maymathematically provide 24, or 2 times 2 time 3 times 2. Accordingly, asillustrated in FIG. 31A, the function provided by interface Interface1may be subdivided to convert the communications of the interface intomultiple interfaces Interface1A, Interface 1B, Interface 1C, etc. whileachieving the same result. As illustrated in FIG. 31B, the functionprovided by interface 1I may be subdivided into multiple interfaces I1a, I1 b, I1 c, etc. while achieving the same result. Similarly,interface I2 of the second code segment which receives information fromthe first code segment may be factored into multiple interfaces I2 a, I2b, I2 c, etc. When factoring, the number of interfaces included with the1st code segment need not match the number of interfaces included withthe 2nd code segment. In either of the cases of FIGS. 31A and 31B, thefunctional spirit of interfaces Interface1 and I1 remain the same aswith FIGS. 30A and 30B, respectively. The factoring of interfaces mayalso follow associative, commutative, and other mathematical propertiessuch that the factoring may be difficult to recognize. For instance,ordering of operations may be unimportant, and consequently, a functioncarried out by an interface may be carried out well in advance ofreaching the interface, by another piece of code or interface, orperformed by a separate component of the system. Moreover, one ofordinary skill in the programming arts can appreciate that there are avariety of ways of making different function calls that achieve the sameresult.

Redefinition: In some cases, it may be possible to ignore, add orredefine certain aspects (e.g., parameters) of a programming interfacewhile still accomplishing the intended result. This is illustrated inFIGS. 32A and 32B. For example, assume interface Interface1 of FIG. 30Aincludes a function call Square (input, precision, output), a call thatincludes three parameters, input, precision and output, and which isissued from the 1st Code Segment to the 2nd Code Segment. If the middleparameter precision is of no concern in a given scenario, as shown inFIG. 32A, it could just as well be ignored or even replaced with ameaningless (in this situation) parameter. One may also add anadditional parameter of no concern. In either event, the functionalityof square can be achieved, so long as output is returned after input issquared by the second code segment. Precision may very well be ameaningful parameter to some downstream or other portion of thecomputing system; however, once it is recognized that precision is notnecessary for the narrow purpose of calculating the square, it may bereplaced or ignored. For example, instead of passing a valid precisionvalue, a meaningless value such as a birth date could be passed withoutadversely affecting the result. Similarly, as shown in FIG. 32B,interface I1 is replaced by interface I1′, redefined to ignore or addparameters to the interface. Interface I2 may similarly be redefined asinterface I2′, redefined to ignore unnecessary parameters, or parametersthat may be processed elsewhere. The point here is that in some cases aprogramming interface may include aspects, such as parameters, that arenot needed for some purpose, and so they may be ignored or redefined, orprocessed elsewhere for other purposes.

Inline Coding: It may also be feasible to merge some or all of thefunctionality of two separate code modules such that the “interface”between them changes form. For example, the functionality of FIGS. 30Aand 30B may be converted to the functionality of FIGS. 33A and 33B,respectively. In FIG. 33A, the previous 1st and 2nd Code Segments ofFIG. 30A are merged into a module containing both of them. In this case,the code segments may still be communicating with each other but theinterface may be adapted to a form which is more suitable to the singlemodule. Thus, for example, formal Call and Return statements may nolonger be necessary, but similar processing or response(s) pursuant tointerface Interface1 may still be in effect. Similarly, shown in FIG.33B, part (or all) of interface I2 from FIG. 30B may be written inlineinto interface I1 to form interface I1″. As illustrated, interface I2 isdivided into I2 a and I2 b, and interface portion I2 a has been codedin-line with interface I1 to form interface I1″. For a concrete example,consider that the interface I1 from FIG. 30B performs a function callsquare (input, output), which is received by interface I2, which afterprocessing the value passed with input (to square it) by the second codesegment, passes back the squared result with output. In such a case, theprocessing performed by the second code segment (squaring input) can beperformed by the first code segment without a call to the interface.

Divorce: A communication from one code segment to another may beaccomplished indirectly by breaking the communication into multiplediscrete communications. This is depicted schematically in FIGS. 34A and34B. As shown in FIG. 34A, one or more piece(s) of middleware (DivorceInterface(s), since they divorce functionality and/or interfacefunctions from the original interface) are provided to convert thecommunications on the first interface, Interface1, to conform them to adifferent interface, in this case interfaces Interface2A, Interface2Band Interface2C. This might be done, e.g., where there is an installedbase of applications designed to communicate with, say, an operatingsystem in accordance with an Interface1 protocol, but then the operatingsystem is changed to use a different interface, in this case interfacesInterface2A, Interface2B and Interface2C. The point is that the originalinterface used by the 2nd Code Segment is changed such that it is nolonger compatible with the interface used by the 1st Code Segment, andso an intermediary is used to make the old and new interfacescompatible. Similarly, as shown in FIG. 34B, a third code segment can beintroduced with divorce interface DI1 to receive the communications frominterface I1 and with divorce interface DI2 to transmit the interfacefunctionality to, for example, interfaces I2 a and I2 b, redesigned towork with DI2, but to provide the same functional result. Similarly, DI1and DI2 may work together to translate the functionality of interfacesI1 and I2 of FIG. 30B to a new operating system, while providing thesame or similar functional result.

Rewriting: Yet another possible variant is to dynamically rewrite thecode to replace the interface functionality with something else butwhich achieves the same overall result. For example, there may be asystem in which a code segment presented in an intermediate language(e.g. Microsoft IL, Java ByteCode, etc.) is provided to a Just-in-Time(JIT) compiler or interpreter in an execution environment (such as thatprovided by the Net framework, the Java runtime environment, or othersimilar runtime type environments). The JIT compiler may be written soas to dynamically convert the communications from the 1st Code Segmentto the 2nd Code Segment, i.e., to conform them to a different interfaceas may be required by the 2nd Code Segment (either the original or adifferent 2nd Code Segment). This is depicted in FIGS. 35A and 35B. Ascan be seen in FIG. 35A, this approach is similar to the Divorcescenario described above. It might be done, e.g., where an installedbase of applications are designed to communicate with an operatingsystem in accordance with an Interface 1 protocol, but then theoperating system is changed to use a different interface. The JITCompiler could be used to conform the communications on the fly from theinstalled-base applications to the new interface of the operatingsystem. As depicted in FIG. 35B, this approach of dynamically rewritingthe interface(s) may be applied to dynamically factor, or otherwisealter the interface(s) as well.

It should also be noted that the above-described scenarios for achievingthe same or similar result as an interface via alternative embodimentsmay also be combined in various ways, serially and/or in parallel, orwith other intervening code. Thus, the alternative embodiments presentedabove are not mutually exclusive and may be mixed, matched and combinedto produce the same or equivalent scenarios to the generic scenariospresented in FIGS. 30A and 30B. It is also noted that, as with mostprogramming constructs, there are other similar ways of achieving thesame or similar functionality of an interface which may not be describedherein, but nonetheless are represented by the spirit and scope of theinvention, i.e., it is noted that it is at least partly thefunctionality represented by, and the advantageous results enabled by,an interface that underlie the value of an interface.

III. Extensions and Inheritance

A foundational concept of the present invention is the utilization ofItems that, to a certain extent, model real-world application objectswith complex structures, behaviors, and operations described by a schemaand enforced by the hardware/software interface system. To provide richsub-typing functionality, and in various embodiments of the presentinvention, a hardware/software interface system (which, for convenience,we shall simply refer to as “WinFS” hereafter) may provides a mechanismby which Items (and Item types) can be extended using “Extensions.”Extensions provide additional data structures (Properties,Relationships, etc.) to already existing Items type structures.

As previously discussed herein (and particularly discussed in SectionsII.E.6.(a). and II.F.3), while the storage platform is intended to beprovided with an initial set of schemas, in at least some embodimentsthe storage platform allows customers, including independent softwarevendor (ISVs), to create new schemas (i.e., new Item and Nested Elementtypes). Since an Item type or Nested Element type defined by the initialset of storage platform schemas may not exactly match an ISVapplication's need, it is necessary to allow ISVs to customize the type.This is allowed with the notion of Extensions. Extensions are stronglytyped instances but (a) they cannot exist independently and (b) theymust be attached to an Item or Nested Element. Also, in addition toaddressing the need for schema extensibility, Extensions are alsointended to address “multi-typing” issues. Since, in some embodiments,the storage platform may not support multiple inheritance or overlappingsubtypes, applications can use Extensions as a way to model overlappingtype instances (e.g., a Document may be a “legal document” as well a“secure document”).

A. Type System

In various embodiments of the present invention, the WinFS type systemprovides a mechanism for defining structures of data. The type system isused to represent data stored in WinFS. A WinFS type is declared in aWinFS schema. A WinFS schema defines a namespace which serves as alogical grouping for a set of types and other WinFS schema elements.WinFS Schemas may be declared using a WinFS Schema Definition Language(SDL) that might use an XML format. The following is an example of apossible schema declaration: <Schema Namespace=″System.Storage” > Typedefinitions </Schema>

WinFS Schemas also serve as a unit for type versioning. WinFS definesseveral system schemas that bootstrap the system. These are theSystem.Storage schema namespace that contains the type declarations ofthe root types in the system, and the System.Storage.WinFS schemanamespace that declares all the primitive scalar types in the system.

The WinFS type system declares a set of simple scalar types. These typesare used as the most primitive building block for all other types in theWinFS type system. These types are declared in the schema namespaceSystem.Storage.WinFS. The following table defines the set of primitivetypes. WinFS Managed Type SQL Type CLR Type Description String SqlStringString Variable-length Unicode data with a maximum length of length of2{circumflex over ( )}31 characters. Length can be fixed from 1-4000characters or unconstrained using the “max” keyword. Binary SqlBinaryByte[ ] Variable-length binary data with a maximum length of length of2{circumflex over ( )}32 bytes. Length can be fixed from 1-8000 bytes orunconstrained using the “max” keyword. Boolean SqlBoolean BooleanNull-able Boolean value Byte SqlByte Byte A singe unsigned byte Int16SqlInt16 Int16 Integer data from −2{circumflex over ( )}15 (−32,768)through 2{circumflex over ( )}15 − 1 (32,767). Int32 SqlInt32 Int32Integer (whole number) data from −2{circumflex over ( )}31(−2,147,483,648) through 2{circumflex over ( )}31 − 1 (2,147,483,647).Int64 SqlInt64 Int64 Integer (whole number) data from −2{circumflex over( )}63 (−9223372036854775808) through 2{circumflex over ( )}63 − 1(9223372036854775807). Single SqlSingle Single Floating precision numberdata from −1.79E+308 through 1.79E+308 Double SqlDouble Double Floatingprecision number data from −3.40E+38 through 3.40E+38 Decimal SqlDecimalDecimal SQLDecimal has a larger value range then CLR Decimal type. Inthe store the precision is always 28 digits and scale is 0. DateTimeSqlDateTime DateTime Date and time data from Jan. 1, 1753, through Dec.31, 9999, with an accuracy of three-hundredths of a second, or 3.33milliseconds. Guid SqlGuid Guid A globally unique identifier (GUID). XmlSqlXmlReader XmlReader For Milestone B, WinFS.Xml will be mapped to“String” type. True XML datatype support is expected in milestone C.Stream TBD TBD A binary data type that is using file stream backedstorage for efficient access. This type will be supported in milestoneC.

A WinFS enumeration is a scalar type that declares a set of namedconstants called a value list. An enumeration type can be used in anyplace where a scalar type can be used. Here is an example for anenumeration declaration: <Enumeration Name=″Gender″ > <Value Name=″Male″/> <Value Name=″Female″ /> </Enumeration>

The values of the enumeration are zero based. In the example aboveGender.Male represents value 0 and Gender.Female represents value 1.

A complex type is defined by a name and a set of properties. A Propertyis a member field of the type, and is defined by a name and a type. Thetype of a Property can be either scalar (including enumeration type) orother complex type. A WinFS type that can be used as type of a Propertyis called a nested type. An instance of a nested type can only exist asa value of a Property of a complex WinFS type-the instance is nestedwithin an instance of a complex type. A nested type is declared usingthe NestedType schema element. Here are some examples of valid typedeclarations: <NestedType Name=″Address″BaseType=″System.Storage.NestedObject″> <Property Name=″Street″Type=″WinFS.String″ Size=″256″ Nullable=″false″ /> <Property Name=″City″Type=″ WinFS.String″ Size=″256″ Nullable=″false″ /> <PropertyName=″State″ Type=″ WinFS.String″ Size=″256″ Nullable=″false″ /><Property Name=″Country″ Type=″WinFSString″ Size=″256″ Nullable=″false″/> </NestedType> <ItemType Name=″Person″ BaseType=″System.Storage.Item″><Property Name=″Name″ Type=″WinFS.String″ Size=″256″ Nullable=″false″ /><Property Name=″Age″ Type=″WinFS.Int32″ Nullable=″false″ Default=″1″/><Property Name=″Picture″ Type=″WinFS.Binary″ Size=″max″/> <PropertyName=″Addresses″ Type=″MultiSet″ MultiSetOfType=″Address″/> </ItemType>

For properties of type String and Binary a Size attribute must bespecified. This attribute specifies the maximum size of the valuescontained in the Property. A Property can optionally declare anullability constraint using the Nullable attribute. A value “false” forthis attribute indicates that the application must provide a value whencreating an instance of the type. Another optional Property attribute isthe Default attribute that specifies the default value for the Property.This value will be assigned to the Property at instance creation time ifthe application did not provide it.

The Addresses Property in the example above is of type MultiSet. AProperty of type MultiSet is also referred to as a multi-valuedProperty. In the example the MultiSet contains a set of instance of typeAddress. A MultiSet is similar to a collection. It can contain zero ormore instances of a complex type. The type of the instance in theMultiSet must be a complex nested type. MultiSet type does not supportinstances of WinFS scalar types (including enumeration types). AProperty of type MultiSet can not be nullable and can not have a defaultvalue.

WinFS supports single-inheritance of types. All types in WinFS mustinherit from one and only on WinFS type. The inheriting type is referredto as the derived type and the type from which this type was derived isreferred to as the base type. The base type in the BaseType attribute ofthe WinFS type declaration elements. Suppose that type A derives frombase type B which in turn derives from type C. The type C is an ancestortype of the types A and B. The type A is a descendant type of the typesB and C. A data instance stored in WinFS is always an instance of asingle type. We can however treat that data instance as an instance of aset of types containing the type and all its ancestor types. For a datainstance which is an instance of such a set of types, we call the typewhich is not the ancestor of any other type in the set the most-derivedtype. A singly-typed data instance is an instance of exactly onemost-derived type. In general, we will refer to the most-derived type ofa singly-typed element as its type. The derived type inherits all theproperties declared in its base type. The derived type can declare newproperties but can not override the properties defined in the base type.A Property declared in the derived type must not use the same name as aProperty of the base type.

The main advantage of inheritance in the data model comes fromsubstitutability of inherited types. Consider the following example:<NestedType Name=“Name” BaseType=“System.Storage.NestedObject” ><Property Name=“FirstName” Type=“WinFS.String” /> <PropertyName=“LastName” Type=“WinFS.String” /> </Nestedype> <NestedTypeName=“NameWithMiddleInitial” BaseType=“Name” > <PropertyName=“MiddleInitial” Type=“WinFS.String” /> </NestedType> <NestedTypeName=“Person” BaseType=“System.Storage.Item” > <Property Name=“RealName”Type=“Name” /> <Property Name=“OtherNames” Type=“MultiSet”MultiSetOfType=“Name” /> </NestedType>

In the above example, type Person has a Property RealName of type Nameand a Property OtherNames which is a set of type Name. Normally it wouldbe required that the Property RealName only have instances whose type isName. However, with inheritance, single-valued instances are allowed tobe the value of RealName as long as the type Name is one of ancestors ofthe most-derived type of that element. So, an instance ofNameWithMiddleInitial will be allowed to be the value of the PropertyRealName.

The same rule is extended to set properties. The Property OtherNamescontains a set of elements. For each singly-typed instance which is amember of that set, the most-derived type of that instance must haveName as one of its ancestors. So, some of the instances in the setOtherNames may be instances of type Name while others maybe instances oftype NameWithMiddleInitial.

Inheritance also enables convenient querying in that it is possible inthe WinFS system to find all instances of a certain type. When lookingfor all instances of a type, the query engine will also return allinstances whose most-derived types are descendents of this type.However, these operations are only supported for Item, Extension, andRelationship types (not Property types). For nested types (a.k.a.,Nested Elements, Property, or complex property types), the operation isonly supported for instances contained within a single multisetProperty.

B. Type Families

In summary, the WinFS type system defines four distinct type families:

-   -   Nested Element types (a.k.a., Nested types or Property types)    -   Item types    -   Relationship types    -   Extension types        Each type family has a different set of properties and usage in        the WinFS type system. The System.Storage schema namespace        declares four types that serve as root types for each of the        type family. The following sections describe the type families        in detail.

1. Nested Element Types

Unlike the other WinFS Type families, nested types can be used as typesof properties of complex WinFS types. Instances of a nested type canonly be nested inside an instance of another complex type. However,Instances of nested types cannot be queried globally—that is,applications cannot compose a simple query that returns all instances ofa given nested type in the WinFS store.

2. Item Types

A WinFS Item is an instance of a type whose ancestor is the typeSystem.Storage.Item. This type is a complex type that is the root of theItem type family. System.Storage.Item declares a Property of name ItemIdof type Guid. This is a special Property of an Item that serves as aprimary key of the Item. The value of this Property is guaranteed to beunique for Items in a given WinFS store. This Property is non-nullable,and must be assigned by the application when creating an instance of anItem type. The ItemId Property is also immutable—it can never change andmust not be reused.

The query engine can return instances of a given Item type in a WinFSstore. This query may returns all instances of the type and all its typedescendent types. Later herein is described the central role that Itemshave in the WinFS system operational semantics.

3. Relationship Types

Relationship types enable Relationships to exist between Items. WinFSRelationship types describe binary Relationships where one Item isdesignated as the source and the other Item is designated as the target.A Relationship is an instance of a type whose ancestor is the typeSystem.Storage.Relationship. This type is a root of the Relationshiptype hierarchy. System.Storage.Relationship type declares the followingproperties:

-   -   SourceItemId—the ItemId of the Item that is a source of the        Relationship instance    -   RelationshipId—a unique identifier of the Relationship relative        to the source Item; the pair (SourceItemId, RelationshipId)        forms the primary key for Relationship types in WinFS    -   TargetItemId—the ItemId of the target of the Relationship;    -   Mode—one of the 3 possible Relationship instance modes: Holding,        Embedding or Reference    -   Name—contains the name of the Relationship for holding        Relationships    -   IsHidden—a Boolean attribute that applications can optionally        use to filter Relationships that do not need to be displayed        The SourceItemId, RelationshipId, TargetItemId and Mode Property        values are immutable. They are assigned at Relationship instance        creation time and can not be changed.

A Relationship type is declared as a complex type with the followingadditional constraints:

-   -   Source and target endpoint specification: each endpoint        specifies a name and the type of the referenced Item    -   Allowed modes of the instances of the Relationship type: a        Relationship instance can not have a value for the Mode Property        that is not allowed in the Relationship declaration

Here is an example of a Relationship declaration: <RelationshipTypeName=“DocumentAuthor” BaseType=“System.Storage.Relationship”AllowsHolding=“true” AllowsEmbedding=“false” AllowsReference=“true” ><Source Name=“Document” Type=“Core.Document”/> <Target Name=“Author”Type=“Core.Contact” /> <Property Name=“Role” Type=“WinFS.String” /><Property Name=“DisplayName” Type=“WinFS.String” /> </RelationshipType>The DocumentAuthor Relationship is declared with restrictions ofinstances to Holding or Reference mode. This means that an instance ofthe DocumentAuthor Relationship can have instances with valueMode=“Reference” or Mode=“Holding”. Instances with valueMode=“Embedding” will not be allowed.

The Relationship declares a source endpoint named “Document” of Itemtype “Core.Document” and a target endpoint of type “Core.Contact”. TheRelationship also declares two additional properties. The Relationshipinstances are stored and accessed separately from the Item. AllRelationship type instances are accessible from a global Extension view.A query can be composed that will return all the instances of a giventype of Relationship.

Given an Item all the Relationships for which the Item is a source canbe enumerated based on the SourceltemId Property of the Relationship.Similarly, for a given Item all the Relationship in the same store forwhich the Item is a target can be enumerated using the TargetItemIdProperty of the Relationship.

a) Relationship Semantics

The following sections describe the semantics of the differentRelationship instance modes:

Holding Relationships: Holding Relationships are used to model referencecount based life-time management of the target Items. An Item can be asource endpoint for zero or more Relationships to Items. An Item that isnot an embedded Item can be a target of one or more holdingRelationships. The target Item must be in the same store as theRelationship instance.

Holding Relationships enforce lifetime management of the targetendpoint. The creation of a holding Relationship instance and the Itemthat it is targeting is an atomic operation. Additional holdingRelationship instances can be created that are targeting the same Item.When the last holding Relationship instance with a given Item as targetendpoint is deleted the target Item is also be deleted.

The types of the endpoint Items specified in the Relationshipdeclaration will be enforced when an instance of the Relationship iscreated. The types of the endpoint Items can not be changed after theRelationship is established.

Holding Relationships play a key role in forming the WinFS Itemnamespace. All holding Relationships participate in the namespacedeclaration. The “Name” Property in the Relationship declaration definesthe name of the target Item relative to the source Item. This relativename is unique for all the holding Relationships sourced from a givenItem and cannot be null. The ordered list of this relative namesstarting from the root Item to a given Item forms the full name to theItem.

The holding Relationships form a directed acyclic graph (DAG). When aholding Relationship is created the system ensures that a cycle is notcreated and thus ensuring that the WinFS Item namespace forms a DAG. Formore information of the WinFS namespace and Item paths refer to the“WinFS Namespace” specification.

Embedding Relationships: Embedding Relationships are modeling theconcept of exclusive control of the lifetime of the target Item. Theyenable the concept of compound Items. The creation of an embeddingRelationship instance and the Item that it is targeting is an atomicoperation. An Item can be a source of zero or more embeddingRelationship. However, an Item can be a target of a one and only oneembedding Relationship. An Item that is a target of embeddingRelationship can not be a target of a holding Relationship. The targetItem must be in the same store as the Relationship instance.

The types of the endpoint Items specified in the Relationshipdeclaration will be enforced when an instance of the Relationship iscreated. The types of the endpoint Items can not be changed after theRelationship is established. The embedding Relationships do notparticipate in the WinFS namespace. The value of the Name Property of anembedding Relationship must be null.

Reference Relationships: Reference Relationships do not control lifetime of the Item it references. Reference Relationships do not guaranteethe existence of the target, nor do they guarantee the type of thetarget as specified in the Relationship declaration. This means that thereference Relationships can be dangling. Also, the referenceRelationship can reference Items in other WinFS stores.

In WinFS reference Relationships will be used to model most non lifetimemanagement Relationships between Items. Since the existence of thetarget is not enforced, the reference Relationship is convenient tomodel loosely-coupled Relationships. The reference Relationship can beused to target Items in other WinFS stores including stores on othermachines. The embedding Relationships do not participate in the WinFSnamespace. The value of the Name Property of an embedding Relationshipmust be null.

b) Relationship Rules and Contraints

The following additional rules and constraints apply to Relationships:

-   -   An Item must be a target of (exactly one embedding Relationship)        or (one or more holding Relationships). The only exception is        the root Item. An Item can be a target of zero or more reference        Relationships.    -   An Item that is a target of embedding Relationship can not be        source of holding Relationships. It can be a source of reference        Relationships.    -   An Item can not be a source of holding Relationship if it is        promoted from file. It can be a source of embedding        Relationships and reference Relationships.    -   An Item can that is promoted from a file can not be a target of        an embedding Relationship.

When a Relationship type A is derived from a base Relationship type Bthe following rules apply:

-   -   Relationship type A can further restrict the endpoint types. The        endpoint types must be subtypes of the corresponding endpoint        type in the base Relationship B. If the endpoint is further        restricted a new name for the endpoint must be declared. If the        endpoint is not restricted the specification of the endpoint is        optional    -   Relationship type A can further restrict the allowed instance        modes declared in the base Relationship. The restricted set of        instance modes must be a subset of the base type set of allowed        instance types.    -   The names of the endpoints are treated as Property names: they        can not be the same as a name of a Property or a name of an        endpoint of the type or its base type.    -   The Source and Target elements are optional if the corresponding        endpoint type is not further restricted by the derived        Relationship

Here is an example of a declaration of a Relationship type that derivesfrom the DocumentAuthor Relationship defined herein above:<RelationshipType Name=“LegalDocumentAuthor”BaseType=“Core.DocumentAuthor” AllowsHolding=“false”AllowsEmbedding=“false” AllowsReference=“true” > <SourceName=“LegalDocument” Type=“Legal.Document ”/> <PropertyName=“CaseNumber” Type=“WinFS.String” /> </RelationshipType>The LegalDocumentAuthor Relationship further restricts the sourceendpoint but not the target endpoint. The source endpoint type isLegal.Document which derives from Core.Document. The target endpoint isnot restricted further in this case, hence the target element isomitted. The Relationship also further restricts the allowed instancemodes. It disallows the Holding mode and only remaining allowed mode isReference.

4. Extension Types

A WinFS Extension is an instance of a type whose ancestor is the typeSystem.Storage.Extension. This type is a complex type that is the rootof the Extension type family.

-   -   System.Storage.Extension defines two properties:    -   ItemId—the ItemId of the Item that the Extension is associated        with    -   ExtensionId—a unique identifier for the Extension relative to        the ItemId. The pair (ItemId, ExtensionId) uniquely identifies        an Extension instance.

The following restrictions apply for Extension types:

-   -   Extension type instances can not exist independently from an        Item. An Item type instance with the same ItemId as the        Extension ItemId must exist in the store before the Extension        type instance is created. The Extension can not be created if        the Item with the given ItemId does not exist. When the Item is        deleted all the Extensions with the same ItemID are deleted.    -   At most one instance of a given most-derived Extension type can        be associated with an individual Item.    -   Extensions can not be sources and targets of Relationships.

There are no constraints on the types of Extensions that can beassociated with a given Item type. Any Extension type is allowed toextend any Item type. When multiple instances of different Extensiontypes are attached to an Item, they are independent from each other inboth structure and behavior. The Extension instances are stored andaccessed separately from the Item. All Extension type instances areaccessible from a global Extension view. A query can be composed thatwill return all the instances of a given type of Extension regardless ofwhat type of Item they are associated with. The ItemId of the Extensionindicates which Item they belong to and can be used to retrieve thecorresponding Item object from the global Item view. Also, given an Itemall Extension instances associated with the Item can be enumerated usingthe ItemId Property of the Extension.

C. Enhanced Functionality

In several embodiments of the present invention, a hardware/softwareinterface system utilizes Extensions and Inheritance in order toformalize relationships between various Items and thereby enhance theability to query a plurality of Items.

1. Inheritance

FIG. 36 illustrates a series of interrelated Items and a subset of theirRelationships. The Document Item 3602 and a Contact Item 3604 aredirectly related by a designated relationship 3606 which, in this case,is an “author relationship”-that is, the Contact 3604 is the “author” ofthe Document 3602. In this example, the Picture Item 3622, the MusicItem 3624, and the Special Item 3626 all inherit from the Document Item3604 because each Items' type is a subtype of the Document Item type.Similarly, the Person Item 3642 and the Organization Item 3644 inheritfrom the Contact Item 3604. In several embodiments of the presentinvention, these inheriting Items (Picture 3622, Music 3624, Special3626, Person 3642, and Organization 3644) not only inherit theProperties of the respective parent Items (Document 3602 and Contact3604), but they also inherit the designated Relationships between thesetwo parent Items. For example, Picture 3622 inherits a relationship 3662to Contact 3604, a relationship 3664 to Person 3642, and a relationship3666 to Organization 3644. A similar set of Relationships are alsoinherited by each of the other Items shown.

However, it is important to note that relationship inheritance is notautomatic and does not occur in every context. For example, attributesthat describe when a type can be inherited (i.e., inheritance controls)are not themselves inheritable. Inheritance parameters are maintainedand regulated by the hardware/software interface system.

2. Extensions

FIG. 37A illustrates the shortcoming of standard subtyping of an Itemfor application specific purposes. In this figure, a Contact isaccessable by four applications, APP1, APP2, APPX, and APPY. APP1 andAPP2 access the standard Contact, but each of APPX and APPY need anextended contact object (add additional fields) and thus derive Contact′and Contact″, each of which inherits from Contact. However, the problemis that there are now three different instances of the basic ContactItem—one in Contact, one in Contact′, and one in Contact″.

A partial solution to this problem, illustrated in FIG. 37B, is toextend the properties of Contact to include the fields necessary for anapplication that requires such. In this case, Contact is extended toinclude the Additional Fields required by APPX. However, directlyextending the fields of an Item such as Contact can only be done once,and thus APPY cannot employ this method.

In one embodiment of the present invention, a more comprehensivesolution is to extend the Contact with an Extension that is distinct andseparate from Contact itself as illustrated in FIG. 37C. In this way,APPX can extend Contact to include its APPX Additional Fields while APPYcan also separately extend Contact to include its APPY AdditionalFields. These Extensions are then themselves searchable and queryable,and thus these Extensions enable a form of multi-typing for thehardware/software interface system.

IV. CONCLUSION

As the foregoing illustrates, the present invention is directed to astorage platform for organizing, searching, and sharing data. Thestorage platform of the present invention extends and broadens theconcept of data storage beyond existing file systems and databasesystems, and is designed to be the store for all types of data,including structured, non-structured, or semi-structured data, such asrelational (tabular) data, XML, and a new form of data called Items.Through its common storage foundation and schematized data, the storageplatform of the present invention enables more efficient applicationdevelopment for consumers, knowledge workers and enterprises. It offersa rich and extensible application programming interface that not onlymakes available the capabilities inherent in its data model, but alsoembraces and extends existing file system and database access methods.It is understood that changes may be made to the embodiments describedabove without departing from the broad inventive concepts thereof.Accordingly, the present invention is not limited to the particularembodiments disclosed, but is intended to cover all modifications thatare within the spirit and scope of the invention as defined by theappended claims.

As is apparent from the above, all or portions of the various systems,methods, and aspects of the present invention may be embodied in theform of program code (i.e., instructions). This program code may bestored on a computer-readable medium, such as a magnetic, electrical, oroptical storage medium, including without limitation a floppy diskette,CD-ROM, CD-RW, DVD-ROM, DVD-RAM, magnetic tape, flash memory, hard diskdrive, or any other machine-readable storage medium, wherein, when theprogram code is loaded into and executed by a machine, such as acomputer or server, the machine becomes an apparatus for practicing theinvention. The present invention may also be embodied in the form ofprogram code that is transmitted over some transmission medium, such asover electrical wiring or cabling, through fiber optics, over a network,including the Internet or an intranet, or via any other form oftransmission, wherein, when the program code is received and loaded intoand executed by a machine, such as a computer, the machine becomes anapparatus for practicing the invention. When implemented on ageneral-purpose processor, the program code combines with the processorto provide a unique apparatus that operates analogously to specificlogic circuits.

1. A method for extending an Item, said Item constituting a discretestorable unit of information that can be manipulated by ahardware/software interface system, said method comprising theutilization of a strongly typed instance (an “Extension”) to extend saidItem, said Extension constituting a discrete storable unit ofinformation that can be manipulated by said hardware/software interfacesystem.
 2. The method of claim 1 wherein said Extension is attached tosaid Item.
 3. The method of claim 1 wherein said Extension cannot existindependently from said Item, such that if said Item ceases to exist,said Extension also ceases to exist.
 4. The method of claim 1 whereinsaid Item is extended by a plurality of Extensions.
 5. The method ofclaim 4 wherein said plurality of Extensions is used to modeloverlapping type instances.
 6. A method for extending a Property, saidProperty constituting a complex property type that can be manipulated bya hardware/software interface system, said method comprising theutilization of a strongly typed instance (an “Extension”) to extend saidProperty, said extension constituting a discrete storable unit ofinformation that can be manipulated by said hardware/software interfacesystem and which is associated with said Property.
 7. The method ofclaim 6 wherein said Extension is attached to said Property.
 8. Themethod of claim 6 wherein said Extension cannot exist independently fromsaid Property, such that if said Property ceases to exist, saidExtension also ceases to exist.
 9. The method of claim 6 wherein saidProperty is extended by a plurality of Extensions.
 10. The method ofclaim 9 wherein said plurality of Extensions is used to modeloverlapping type instances.
 11. A method for a hardware/softwareinterface system to organize and efficiently query a plurality of Items,said Item constituting discretely storable units of information that canbe manipulated by a hardware/software interface system, said pluralityof Items comprising a first Relationship that relates a first Item and asecond Item, said method comprising, for the instantiation of a thirdItem, said third Item being a subtyped instance of said first Item, saidthird Item automatically inherits from said first Item a Relationshipwith said second Item.
 12. The method of claim 11 wherein, for theinstantiation of a fourth Item, said fourth Item being a subtypedinstance of said second Item, said fourth Item automatically inheritsfrom said second Item a Relationship with said first Item.
 13. Themethod of claim 12 wherein said fourth Item further automaticallyinherits from said second Item a Relationship with said third Item. 14.The method of claim 11 wherein, for each of a first plurality ofsubtyped instances of said first Item, each of said first plurality ofsubtyped instances automatically inherits from said first Item aRelationship with said second Item.
 15. The method of claim 14 wherein,for each of a second plurality of subtyped instances of said secondItem, said second plurality of subtyped instances further automaticallyinherit from said second Item Relationships with said first Item. 16.The method of claim 15 wherein each of said first plurality of subtypedinstances automatically inherits from said first Item a Relationship toeach of said second plurality of subtyped instances.
 17. The method ofclaim 16 wherein each of said second plurality of subtyped instancesautomatically inherits from said second Item a Relationship to each ofsaid first plurality of subtyped instances.
 18. A hardware/softwareinterface system for manipulating a plurality of Items, wherein an Itemconstitutes a discrete storable unit of information that can bemanipulated by said hardware/software interface system, said systemcomprising a subsystem for extending an Item with a strongly typedinstance (an “Extension”), said Extension constituting a discretestorable unit of information that can be manipulated by saidhardware/software interface system.
 19. The system of claim 18 whereinsaid Extension is attached to said Item.
 20. The system of claim 18wherein said Extension cannot exist independently from said Item, suchthat if said Item ceases to exist, said Extension also ceases to exist.21. The system of claim 18 wherein said Item is extended by a pluralityof Extensions.
 22. A hardware/software interface system for manipulatinga plurality of Properties, said Properties constituting complex propertytypes that can be manipulated by a hardware/software interface system,said system comprising a subsystem for extending an Property with astrongly typed instance (an “Extension”), said Extension constituting adiscrete storable unit of information that can be manipulated by saidhardware/software interface system.
 23. The system of claim 22 whereinsaid Extension is attached to said Property.
 24. The system of claim 22wherein said Extension cannot exist independently from said Property,such that if said Property ceases to exist, said Extension also ceasesto exist.
 25. The system of claim 22 wherein said Property is extendedby a plurality of Extensions.
 26. A hardware/software interface systemfor manipulating a plurality of Items, wherein an Item constitutes adiscrete storable unit of information that can be manipulated by saidhardware/software interface system, said system comprising a subsystemfor organizing and efficiently querying said plurality of Items, saidplurality of Items comprising a first Relationship that relates a firstItem and a second Item, wherein said subsystem: for the instantiation ofa third Item, said third Item being a subtyped instance of said firstItem, automatically establishes an relationship between said third Itemand said second Item; for the instantiation of a fourth Item, saidfourth Item being a subtyped instance of said second Item, automaticallyestablishes an relationship between said fourth Item and said firstItem; and automatically establishes an relationship between said fourthItem and said first Item.
 27. The system of claim 26 wherein, for eachof a first plurality of subtyped instances of said first Item, and foreach of a second plurality of subtyped instances of said second Item,said subsystem: automatically establishes a relationship for each ofsaid first plurality of subtyped instances with said second Item;automatically establishes a relationship for each of said secondplurality of subtyped instances with said first Item; and automaticallyestablishes a relationship for each of said first plurality of subtypedinstances with each of said second plurality of subtyped instances. 28.A hardware/software interface system for manipulating a plurality ofItems, wherein an Item constitutes a discrete storable unit ofinformation that can be manipulated by said hardware/software interfacesystem, said system comprising a subsystem for extending an Item with astrongly typed instance (an “Extension”), said Extension constituting adiscrete storable unit of information that can be manipulated by saidhardware/software interface system.
 29. The system of claim 28 whereinsaid Extension is attached to said Item.
 30. The system of claim 28wherein said Extension cannot exist independently from said Item, suchthat if said Item ceases to exist, said Extension also ceases to exist.31. The system of claim 28 wherein said Item is extended by a pluralityof Extensions.
 32. A hardware/software interface system for manipulatinga plurality of Properties, said Properties constituting complex propertytypes that can be manipulated by a hardware/software interface system,said system comprising a subsystem for extending an Property with astrongly typed instance (an “Extension”), said Extension constituting adiscrete storable unit of information that can be manipulated by saidhardware/software interface system.
 33. The system of claim 32 whereinsaid Extension is attached to said Property.
 34. The system of claim 32wherein said Extension cannot exist independently from said Property,such that if said Property ceases to exist, said Extension also ceasesto exist.
 35. The system of claim 32 wherein said Property is extendedby a plurality of Extensions.
 36. A hardware/software interface systemfor manipulating a plurality of Items, wherein an Item constitutes adiscrete storable unit of information that can be manipulated by saidhardware/software interface system, said system comprising a subsystemfor organizing and efficiently querying said plurality of Items, saidplurality of Items comprising a first Relationship that relates a firstItem and a second Item, wherein said subsystem: for the instantiation ofa third Item, said third Item being a subtyped instance of said firstItem, automatically establishes an relationship between said third Itemand said second Item; for the instantiation of a fourth Item, saidfourth Item being a subtyped instance of said second Item, automaticallyestablishes an relationship between said fourth Item and said firstItem; and automatically establishes an relationship between said fourthItem and said first Item.
 37. The system of claim 36 wherein, for eachof a first plurality of subtyped instances of said first Item, and foreach of a second plurality of subtyped instances of said second Item,said subsystem: automatically establishes a relationship for each ofsaid first plurality of subtyped instances with said second Item;automatically establishes a relationship for each of said secondplurality of subtyped instances with said first Item; and automaticallyestablishes a relationship for each of said first plurality of subtypedinstances with each of said second plurality of subtyped instances. 38.A computer-readable medium comprising computer-readable instructions forextending an Item, said Item constituting a discrete storable unit ofinformation that can be manipulated by a hardware/software interfacesystem, said computer-readable instructions comprising instructions forthe utilization of a strongly typed instance (an “Extension”) to extendsaid Item, said Extension constituting a discrete storable unit ofinformation that can be manipulated by said hardware/software interfacesystem wherein said Extension is attached to said Item and wherein saidExtension also ceases to exist when said Item ceases to exist.
 39. Acomputer-readable medium comprising computer-readable instructions forextending an Property, said Property constituting a complex propertytype that can be manipulated by a hardware/software interface system,said computer-readable instructions comprising instructions for theutilization of a strongly typed instance (an “Extension”) to extend saidProperty, said Extension constituting a discrete storable unit ofinformation that can be manipulated by said hardware/software interfacesystem wherein said Extension is attached to said Property and whereinsaid Extension also ceases to exist when said Property ceases to exist.40. A computer-readable medium comprising computer-readable instructionsfor organizing and efficiently querying a plurality of Items, said Itemconstituting discretely storable units of information that can bemanipulated by a hardware/software interface system, saidcomputer-readable instructions comprising instructions for:instantiating a first Item, a second Item, and a first Relationship thatrelates a first Item and a second Item; instantiating a third Item, saidthird Item being a subtyped instance of said first Item; andautomatically establishing an inherited Relationship between said thirdItem and said second Item.
 41. The computer-readable instructions ofclaim 40 further comprising instructions for: instantiating a fourthItem, said fourth Item being a subtyped instance of said second Item;and automatically establishing an inherited Relationship between saidfourth Item and said first Item.
 42. The computer-readable instructionsof claim 41 further comprising instructions for automaticallyestablishing an inherited Relationship between said third Item and saidfourth Item.